Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default variable not defined, ActiveWorkbook.name DISREGARD QUESTION

I found the problem. Someone gave me the answer yesterday and I put them in
but it didn't save because of another error. It is missing the ":" at the
end of the path for mac directorties.
Sorry for the post.

"Janis" wrote:

I get a "variable not defined" error on the myfilename = xxxx
line? It doesn't like the
myfilename = "activeworkbook.name"
I looked in the object browser and didn't see a property for the
activeworkbook of name ?
How do I get the name from the activeworkbook? Or am I missing somethign?


while you are looking at it, I don't know if the fileformat:= 19 is correct
but I want to save it as a macTextfile which the book says is 19.
thanks

Sub saveIndesign()
'Appends date to filename so as to not write over an existing file

' saveIndesign Macro

Const fPath As String = "Mac OS X:Users:jrough:Documents"
Dim fName As String
Dim myFileName As String
myFileName = Left(ActiveWorkbook.Name, Len(AtiveWorkbook.Name) - 4) & Date &
".txt"

fName = fPath & myFileName & Time()
ActiveWorkbook.SaveAs XlFileFormat:=19, Filename:=fName
MsgBox "File Saved to " & fName
End Sub


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
set variable to activeworkbook davegb Excel Programming 2 May 24th 06 08:21 PM
msoShapeRectangle -- Variable not defined ??? Linda Edlund Excel Programming 3 May 4th 06 10:06 AM
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? Daniel Excel Worksheet Functions 1 July 9th 05 03:05 AM
'ActiveWorkbook.Names.Add Name:' how to make range variable? TeeSea Excel Programming 1 June 9th 05 03:42 PM
Problem with a defined variable ric Excel Programming 2 April 26th 04 08:42 PM


All times are GMT +1. The time now is 01:35 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"