PC Review


Reply
Thread Tools Rate Thread

assigning macro

 
 
bryan
Guest
Posts: n/a
 
      17th Mar 2009
I am re-asking this as I'm not getting any info back.

I have a template which I assign a macro to toolbar button, macro is called
'SaveToDrive'.
I created the toolbar and then used Commands, Macros, Cutom Button. Right
click on button to assign macro ' SaveToDrive', macros in 'the template name'

Macro saves as entry in cell A12.
Lets's say I enter 'BJS1' into this cell, it saves as BJS1.xls.
If I open the template and look at the assign macro, it now says 'BJS1.xls'
not 'SaveToDrive'.

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


 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      17th Mar 2009
Hi Bryan

I tried this few days back with your original post. When you click
AssignMacro is that displaying just the xls file name or xls!Macroname as
below.

a12.xls!SaveToDrive (since I have entered 'a12' to Range("A12")

and then what happens next.....if you again click the button...

If this post helps click Yes
---------------
Jacob Skaria


 
Reply With Quote
 
bryan
Guest
Posts: n/a
 
      17th Mar 2009
It is displaying 'C:\BJS1.xls'!SaveToDrive.

If I delete BJS1.xls from my c: it will say it can not find it. When I open
a new template spreadsheet the macro assign should always be 'SaveToDrive'
I've created numerous Word templates and this works fine but, now I have a
request for doing the same but, with Excel.

Am I creating the toolbar button correctly and assigning the macor correctly?

Thanks,
Bryan

"Jacob Skaria" wrote:

> Hi Bryan
>
> I tried this few days back with your original post. When you click
> AssignMacro is that displaying just the xls file name or xls!Macroname as
> below.
>
> a12.xls!SaveToDrive (since I have entered 'a12' to Range("A12")
>
> and then what happens next.....if you again click the button...
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning macro buttons to macro code in another file Enz Microsoft Excel Programming 2 25th May 2009 06:44 PM
assigning macro carrera Microsoft Excel Misc 17 21st Mar 2008 09:00 PM
Assigning Macro to a button in a macro Wild Jim Microsoft Excel Programming 0 12th Nov 2006 09:20 PM
assigning a macro to the tab key =?Utf-8?B?QmlsbCBL?= Microsoft Excel Programming 1 7th Sep 2006 06:04 PM
Assigning a macro deepakj Microsoft Excel Worksheet Functions 1 13th Feb 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


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