Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
I have created Macro in office XP but it doesn't work in Office 2000 because
use of "Application.FileDialog(msoFileDialogFolderPicker) " in XP Macro which is not supported in Office 2000. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Hi
As I don't use OfficeXP, I'm not sure what .. does, but I quess in Excel2000 you can try with .... fFullName = Application.GetOpenFilename(Title:=fTitle, FileFilter:=FilterList) -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Naman.Patel" wrote in message ... I have created Macro in office XP but it doesn't work in Office 2000 because use of "Application.FileDialog(msoFileDialogFolderPicker) " in XP Macro which is not supported in Office 2000. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Naman,
Use the SHBrowseForFolder API (or one of the many wrapped in a class). Many examples from Google. NickHK "Naman.Patel" wrote in message ... I have created Macro in office XP but it doesn't work in Office 2000 because use of "Application.FileDialog(msoFileDialogFolderPicker) " in XP Macro which is not supported in Office 2000. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
"Arvi Laanemets"
your suggestion might be working but my problem is tha I want to select a folder from dialog box which can work in both 2000 and XP and I need it's title my own. waiting for reply Thanks for ur help |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Hi
Is GetOpenFilename() not supported in OfficeXP? Usually they have features from earlier versions supported - I think it is worth to check with OfficeXP. -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Naman.Patel" wrote in message ... "Arvi Laanemets" your suggestion might be working but my problem is tha I want to select a folder from dialog box which can work in both 2000 and XP and I need it's title my own. waiting for reply Thanks for ur help |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Arvi,
I guess it is but the OP wants to select a Folder, not a file. Hence I suggested the SHBrowseForFolder API. NickHK "Arvi Laanemets" wrote in message ... Hi Is GetOpenFilename() not supported in OfficeXP? Usually they have features from earlier versions supported - I think it is worth to check with OfficeXP. -- Arvi Laanemets ( My real mail address: arvi.laanemets<attarkon.ee ) "Naman.Patel" wrote in message ... "Arvi Laanemets" your suggestion might be working but my problem is tha I want to select a folder from dialog box which can work in both 2000 and XP and I need it's title my own. waiting for reply Thanks for ur help |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
"Naman.Patel" wrote in message
... "Arvi Laanemets" your suggestion might be working but my problem is tha I want to select a folder from dialog box which can work in both 2000 and XP and I need it's title my own. Is this work for you? Sub test() Dim str As String str = getFoldername MsgBox "folder: " & str End Sub Function getFoldername() As String Dim objShell As Object Dim ssfWINDOWS As Long Dim objFolder As Object Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(0, "Select folder", 0) If (Not objFolder Is Nothing) Then getFoldername = objFolder.Self.Path Else getFoldername = "" End If Set objFolder = Nothing Set objShell = Nothing End Function keizi |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
How to use shbrowseforfolder api???
I am using VBA enviornoment!!! "NickHK" wrote: Naman, Use the SHBrowseForFolder API (or one of the many wrapped in a class). Many examples from Google. NickHK "Naman.Patel" wrote in message ... I have created Macro in office XP but it doesn't work in Office 2000 because use of "Application.FileDialog(msoFileDialogFolderPicker) " in XP Macro which is not supported in Office 2000. |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Thanks,
It is working fine and it has solved my problem. but I want some more help on it. do u have ne help documents for this? I need to open the file also.. |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
Naman,
You can still use the Windows API. Get the API-Guide from http://www.allapi.net/ NickHK "Naman.Patel" wrote in message ... How to use shbrowseforfolder api??? I am using VBA enviornoment!!! "NickHK" wrote: Naman, Use the SHBrowseForFolder API (or one of the many wrapped in a class). Many examples from Google. NickHK "Naman.Patel" wrote in message ... I have created Macro in office XP but it doesn't work in Office 2000 because use of "Application.FileDialog(msoFileDialogFolderPicker) " in XP Macro which is not supported in Office 2000. |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro in 2000
documents for BrowseFolder is here
http://msdn.microsoft.com/library/de...eforfolder.asp and do you want just to open file like from explore or want to get a file name to open? if just want to open, then Sub fnShellExploreVB() Dim objShell As Object Set objShell = CreateObject("Shell.Application") objShell.Explore (0) Set objShell = Nothing End Sub will open the file. but want to get a file name to open, i think it's better to use Application.GetOpenFilename like sub test1() fileToOpen = Application.GetOpenFilename("all files (*.*), *.*") If fileToOpen < False Then MsgBox "select : " & fileToOpen End If end sub keizi "Naman.Patel" wrote in message ... Thanks, It is working fine and it has solved my problem. but I want some more help on it. do u have ne help documents for this? I need to open the file also.. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro in Excel 2000 | Excel Discussion (Misc queries) | |||
2nd try --Macro to transfer data in an Excel sheet (2000) in Access 2000 ( code to replace what wizard do) | Excel Programming | |||
Excel 2000 Macro | Excel Programming | |||
Create macro to download access 2000 table to excel 2000 spreadsheet | Excel Programming | |||
Excel 2000 Macro | Excel Programming |