Question about Microsoft Office Professional 2007 Full Version for PC

2 Answers

Application.FileSearch I have a VBA code on MS Access 2003 version but when i open it in MS Access 2007 it highlight on "Application.FileSearch" and display a message does not recognize... can somebody help..!

Posted by on

  • eeder1 Jan 29, 2009

    I am switching from Office 2003 to 2007 and the function in the following code is giving me a runtime error which I am finding out is common..any suggestions to fix would be greatly appreciated


    Private Sub CommandButton1_Click()

    Dim i As Integer
    Dim RdWrkBk As String
    Dim WrWrkBk As String
    Dim CodeWrkBk As String
    Dim a As Integer
    Dim sort As Integer

    a = 6

    CodeWrkBk = ActiveWorkbook.Name

    Application.DisplayAlerts = False
    Application.ScreenUpdating = True

    RdWrkBk1 = ActiveWorkbook.Name
    counter = 0

    test = Workbooks(CodeWrkBk).Worksheets("1").Cells(7 + counter, 8)
    counter = counter + 1
    Loop Until test = ""

    Call GetBrowse
    With Application.FileSearch
    .LookIn = strPath
    .Filename = "*.xls"
    If .Execute() > 0 Then
    WrWrkBk = ActiveWorkbook.Name
    x = Workbooks(WrWrkBk).Worksheets.Count

    sort = 8
    For i = 1 To counter - 1
    Application.ScreenUpdating = False
    strfile = .FoundFiles(i)

    Find_Last_Slash (strfile)
    strfile = Mid(strfile, 1, position)
    a = a + 1
    strDiv = Workbooks(RdWrkBk1).Sheets(1).Cells(a, sort).Value
    strfile = strfile & strDiv & ".xls"

    Workbooks.Open strfile 'open workbook

    Find_Last_Slash (strfile)
    RdWrkBk = Trim(Mid(strfile, position + 1, 50))

    newname = "Unit Waterfalls-" & Workbooks(RdWrkBk1).Sheets(1).Cells(i + 6, 9).Value



2 Answers

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

'!!! Replacement solution including searching in subdirectories !!!!

Sub FileSearchByHavrda_Example_of_procedure_calling()
' Example of FileSearchByHavrda procedure calling as replacement of missing FileSearch function in the newest MS Office VBA
' 01.06.2009, Author: P. Havrda, Czech Republic
Dim FileNameWithPath As Variant
Dim ListOfFilenamesWithParh As New Collection ' create a collection of filenames
' Filling a collection of filenames (search Excel files including subdirectories)
Call FileSearchByHavrda(ListOfFilenamesWithParh, "C:\Temp", "*.xls", True)
' Print list to immediate debug window and as a message window
For Each FileNameWithPath In ListOfFilenamesWithParh ' cycle for list(collection) processing
Debug.Print FileNameWithPath & Chr(13)
MsgBox FileNameWithPath & Chr(13)
Next FileNameWithPath
' Print to immediate debug window and message if no file was found
If ListOfFilenamesWithParh.Count = 0 Then
Debug.Print "No file was found !"
MsgBox "No file was found !"
End If
End Sub
Private Sub FileSearchByHavrda(pFoundFiles As Collection, pPath As String, pMask As String, pIncludeSubdirectories As Boolean)
' Search files in Path and create FoundFiles list(collection) of file names(path included) accordant with Mask (search in subdirectories if enabled)
' 01.06.2009, Author: P. Havrda, Czech Republic
Dim DirFile As String
Dim CollectionItem As Variant
Dim SubDirCollection As New Collection
' Add backslash at the end of path if not present
pPath = Trim(pPath)
If Right(pPath, 1) <> "\" Then pPath = pPath & "\"
' Searching files accordant with mask
DirFile = Dir(pPath & pMask)
Do While DirFile <> ""
pFoundFiles.Add pPath & DirFile 'add file name to list(collection)
DirFile = Dir ' next file
' Procedure exiting if searching in subdirectories isn't enabled
If Not pIncludeSubdirectories Then Exit Sub
' Searching for subdirectories in path
DirFile = Dir(pPath & "*", vbDirectory)
Do While DirFile <> ""
' Add subdirectory to local list(collection) of subdirectories in path
If DirFile <> "." And DirFile <> ".." Then If ((GetAttr(pPath & DirFile) And vbDirectory) = 16) Then SubDirCollection.Add pPath & DirFile
DirFile = Dir 'next file
' Subdirectories list(collection) processing
For Each CollectionItem In SubDirCollection
Call FileSearchByHavrda(pFoundFiles, CStr(CollectionItem), pMask, pIncludeSubdirectories) ' Recursive procedure call
End Sub

Posted on Jun 24, 2009

  • Level 1:

    An expert who has achieved level 1.


    An expert who has answered 20 questions.


    An expert that hasĀ over 10 points.


    An expert whose answer gotĀ voted for 2 times.

  • Contributor
  • 36 Answers

Probably there is a incompatability between 2003 and 2007 for this. You could try to create the database blank in 2007 and then import the objects from your 2003 database.

Posted on Jul 26, 2008


1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

A 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
The service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
Good luck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

2 Answers

PowerPoint Viewer error 32-bit

Try PowerPoint Repair Toolbox is powerful .PPT repair software, resolving any problem, causing the damage of PowerPoint files.

For more:

Apr 09, 2015 | Microsoft Office Professional 2007 Full...

1 Answer

Remove VBA Password

How to Remove VBA Password - VBA Password Remover Tool to quickly or reliably recover VBA password. This software recover VBA password from your sheet/workbook project password and open MS office files. Source link:-

Apr 15, 2013 | Computers & Internet

2 Answers

How do I open a docx file without it corrupting.

Docx file is the default file format for MS word 2007 and 2010. If you have those application then you can open it easily. If you have the 2003 and below version, you will need to download the Office 2007 compatibility pack and install it to your PC then you can open the docx file

Apr 27, 2011 | Microsoft Windows XP Home Edition

1 Answer

What is the extension file name for a microsoft access file?

According to Wikipedia:-

Access Project .adp
Access Blank Project Template .adn
Access Database (2007) .accdb
Access Database Runtime (2007) .accdr
Access Database Template (2007) .accdt
Access Database (2003 and earlier) .mdb
Access Database, used for addins (2,95,97), previously used for workgroups (2). .mda
Access Database Template (2003 and earlier) .mdt
Access Workgroup, database for user-level security. .mdw
Access (SQL Server) detached database (2000) .mdf
Protected Access Database, with compiled VBA (2003 and earlier) .mde
Protected Access Database, with compiled VBA (2007) .accde
Windows Shortcut: Access Macro .mam
Windows Shortcut: Access Query .maq
Windows Shortcut: Access Report .mar
Windows Shortcut: Access Table .mat
Windows Shortcut: Access Form .maf

Jun 03, 2010 | Microsoft Office Access 2003 (077-02871)...

1 Answer

When using any microsoft office 2007 application get an error saying that microsoft office has stopped working. Can open a new file most of the time but when opening old files get this message. Files can...

Well this is nothing but a compatability problem. Some files which are written in MS office 2003 or other previous versions can't be opened in MS Ofiice 2007.

May 27, 2010 | Microsoft Office Professional 2007 Full...

1 Answer

How to dov VBA in ms office 2007

Right Click on the sheet name on the bottom left corner of the excel window and on the pop up menu, click on "View Code". It will open a box where you can perform VBA Coding.

Aug 04, 2009 | Microsoft MS OFFICE 2007 SBE MLK (NA) SW....

1 Answer

There could be a number of reasons for this error, most likely something wrong with your VBA code. Check out this troubleshooting thread.

Let me know how it goes for you!


Jan 09, 2009 | Microsoft Office Professional 2007 Full...

1 Answer

File not available

it might be the virus effect, or the files of office 2007 could not open on previous versions of MS office. the files must be saved as ms office 97-2003 files.

Dec 23, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Office 2007 Standard - VBA not working

There is no indication that VBA should not work in all versions of Excel. There is a new file extension (xlsm), which is used to activate macros and allow usage. If you have, perhaps, opened and saved with incorrect extension (new is xlsx), VBA may be unavailable. Try to resave it with the changed extension. It seems likely that this is the issue (reference Also, if you make sure your Save As option is set at xlsm, this should help to prevent problems. VBA should not be an issue in any version of Excel and custom functions ARE available (see It should be as simple as changing the extension, and I would suggest changing the default save as option. If this helps, please rate "FixYa"! Thanks!

Apr 03, 2008 | Microsoft Office Standard for PC

Not finding what you are looking for?
Microsoft Office Professional 2007 Full Version for PC Logo

1,266 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2970 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18419 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides