View Single Post
  #3   Report Post  
Garrystone Garrystone is offline
Junior Member
 
Posts: 16
Default

Thanks for your advice (which of course worked) with a small tweak (I needed to dock the toolbar:top and not float).

Thanks again

Garry

Quote:
Originally Posted by Gord Dibben View Post
You must code to create the button when workbook opens, then delete the
button when it closes.

See Debra Dalgleish's site for creating a Toolbar with your button and
assign a macro to that button.

http://www.contextures.on.ca/xlToolbar02.html#Code

Note: the instructions found are for creating an add-in.

Just modify those instructions to place the code into a general module in
the workbook the students are to use.


Gord Dibben MS Excel MVP


On Thu, 2 Oct 2008 12:10:33 +0100, Garrystone
wrote:


Hi
I know how to create a custom button and attach a macro to that button
and that I can automatically load a button 'Private Sub
Workbook_Activate()' (Alt F11). Which I need to do because this
spreadsheet is used by many of my students (different profiles) and I
only want it available in a single spreadsheet file that they will
access. My problem lies in that each time I load this Spreadsheet a new
button is placed on the toolbar (i.e. load 3 times, I end up with 3 new
buttons) and I can't seem to get the button to link to the macro
without it running the command and not waiting until the button is
pressed.
Can anybody help please as it is causing me much distress.

Thank you

Garry