Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 126
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro in Excel 2000 Raymond Dorais Excel Discussion (Misc queries) 1 January 17th 06 03:08 AM
2nd try --Macro to transfer data in an Excel sheet (2000) in Access 2000 ( code to replace what wizard do) André Lavoie Excel Programming 0 September 27th 05 01:50 PM
Excel 2000 Macro Keven Swingle Excel Programming 4 June 8th 05 06:48 PM
Create macro to download access 2000 table to excel 2000 spreadsheet Tushar[_2_] Excel Programming 3 October 21st 04 02:44 PM
Excel 2000 Macro No Name Excel Programming 1 December 27th 03 04:44 PM


All times are GMT +1. The time now is 09:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"