Thread: Almost there
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Jackson Jim Jackson is offline
external usenet poster
 
Posts: 324
Default Almost there

Your response seems a bit harsh. Remember not all participants have the same
knowledge as you or I. We're here to be helpful.
--
Best wishes,

Jim


"NickHK" wrote:

Yes, not reading the error message.
It tells you are missing an "End With" before the "End Sub".

NickHK

wrote in message
ups.com...
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