Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Save as new file command button

I am trying to create a macro with a command button that will save the
worksheet as a file name specified by the user name or as a field title in
the spreadsheet.
Here is what I have right now that I keep getting a error with:
Private Sub SaveButton_Click()

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\MYoung\Desktop\h&h VALVE\" &
Range("Company:"), _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

If someone could please help with with this error and coding problem.

  #2   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default Save as new file command button


"EnGo" wrote in message
...
I am trying to create a macro with a command button that will save the
worksheet as a file name specified by the user name or as a field title in
the spreadsheet.
Here is what I have right now that I keep getting a error with:
Private Sub SaveButton_Click()

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\MYoung\Desktop\h&h VALVE\" &
Range("Company:"), _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

If someone could please help with with this error and coding problem.



Does your named range end with a : as in Range("Company:") ? or should it
be Range("Company"),


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Save as new file command button

N10: It ends with a colon(:), does that pose a problem. I can remove the
colons from the tables if so.

"N10" wrote:


"EnGo" wrote in message
...
I am trying to create a macro with a command button that will save the
worksheet as a file name specified by the user name or as a field title in
the spreadsheet.
Here is what I have right now that I keep getting a error with:
Private Sub SaveButton_Click()

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\MYoung\Desktop\h&h VALVE\" &
Range("Company:"), _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

If someone could please help with with this error and coding problem.



Does your named range end with a : as in Range("Company:") ? or should it
be Range("Company"),



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
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
Command Button Prompt Save As? Rich Excel Discussion (Misc queries) 3 May 17th 06 02:33 PM
Save workbook via Command Button???? Chris Watson[_5_] Excel Programming 3 March 23rd 06 10:11 AM
set up a command button or macro for open file to "save as" Mo Excel Programming 1 June 23rd 05 12:19 AM
Command Button to Save As Workbook... RPIJG[_13_] Excel Programming 1 May 12th 04 08:59 PM


All times are GMT +1. The time now is 01:56 AM.

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

About Us

"It's about Microsoft Excel"