macro problem

G

Gerbatin

After pasting your instructions, I have:

Keyboard Shortcut: Ctrl+Shift+N

Dim myName As String
myName = "LTP0" & Format(Date, "mmdd")
'
Sheets(myName).Select
Sheets(myName).Name = "matriz2"


Range("C5").Select
ChDir "C:\Office 97\Internet"
ActiveWorkbook.SaveAs Filename:="C:\Office 97\Internet\matriz2.xls"

FileFormat:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub


Line ActiveWorkbook.... shows syntax erro
 
D

Dave Peterson

I think you got hit by wordwrap:

Keyboard Shortcut: Ctrl+Shift+N

Dim myName As String
myName = "LTP0" & Format(Date, "mmdd")
'
Sheets(myName).Select
Sheets(myName).Name = "matriz2"


Range("C5").Select
ChDir "C:\Office 97\Internet"
ActiveWorkbook.SaveAs Filename:="C:\Office 97\Internet\matriz2.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

Notice the line continuation characters (space underscore) at the end of each of
those lines.
 

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

Similar Threads


Top