Excel 2002 GetSaveAsFileName

K

Kevin May

Within Excel 2000 i used the getsaveasfilename option and
created the filename from Text and Strings. The text
contained the word "Homepages" and this does not seem to
work in 2002 but did in 2000. Any ideas ?
 
D

Dave Peterson

This worked ok for me in xl2002 and win98:

Option Explicit
Sub testme02()

Dim myString As String
Dim myFileName As Variant


myString = "asdf homepages qwer.xls"

myFileName = Application.GetSaveAsFilename _
(InitialFileName:="C:\my documents\exce\" & myString)

If myFileName = False Then
Exit Sub
End If

ThisWorkbook.SaveAs Filename:=myFileName

End Sub

You may want to post that snippet of code (not the workbook) that's causing
heartburn.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top