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: 114
Default Assign macro

I have a template which has a toolbar button. The buton was assigned macro to
macro - SaveToDrive.
The save macro uses cell A12 to saveas name.
This is a template so each new instance of the xls is blank.
On first i enter 'BJS1' in A12 and the run macro, saves as A12.xls to my c:
drive and closes.
If I delete BJS1.xls and open new and enter 'BJS2' in A12 and save I get
message
'BJS1.xls' could not be found.
If I then open the template and look to see macro assigned to button it has
'BJS1.xls' assigned and not 'SaveTo Drive'.

The template save is written like this:
sFilename = "c:" + strcell"
ActiveWorkbook.SaveAs Filename:=sFilename, _
FileFormat:=xlNormal, _
ReadOnlyRecommended:=False, _
CreateBackup:=False

Application.Quit
Application.StatusBar = "Application Closing."

Am I missing something on the save or am I doing something wrong in
assigning the macro.
I am protecting the sheet and the workbook.
Thanks,
Bryan

 
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
Assign a Macro The Rook[_2_] Excel Discussion (Misc queries) 5 February 19th 07 06:53 PM
assign a macro daidipya Excel Discussion (Misc queries) 4 May 30th 06 02:51 PM
assign macro PH NEWS Excel Worksheet Functions 2 February 28th 06 02:17 PM
How to assign a macro Mike Excel Discussion (Misc queries) 4 July 5th 05 06:43 AM
still can't assign MACRO grin2000[_11_] Excel Programming 3 June 22nd 04 04:17 AM


All times are GMT +1. The time now is 01:16 PM.

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"