LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Almost there

I got help from the group last night in how to give the file a dynamic
file name using a macro, I was given the following VB CODE:

Sub test()

Dim Path As String

Path = "C:\Documents and Settings\Richard Sabbara\Desktop\"

With ActiveWorkbook
.SaveAs Filename:=Path & .Worksheets("Sheet1").Range("C1").Value &
".xls", _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False

End Sub


Now the problem that I am having is more basic, when I try and run this
macro, I get the error message:

Compile Error: Expected End With

I am missing something basic here, what is it?

Thanks,

Richard

 
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



All times are GMT +1. The time now is 10:46 AM.

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

About Us

"It's about Microsoft Excel"