Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.setup
|
|||
|
|||
![]()
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 |
#3
![]() |
|||
|
|||
![]()
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:
|
#4
![]()
Posted to microsoft.public.excel.setup
|
|||
|
|||
![]()
Good to hear.
Thanks for the feedback On Sat, 4 Oct 2008 12:21:24 +0100, Garrystone wrote: 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 Gord Dibben;733059 Wrote: 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- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom 2 axis chart saved as template fails to load | Charts and Charting in Excel | |||
Load image from directory for custom toolbar of Excel 2000 | Excel Worksheet Functions | |||
Time to load spreadsheet | New Users to Excel | |||
Custom buttons | Excel Discussion (Misc queries) | |||
what causes excel to take so long to load a spreadsheet | Excel Discussion (Misc queries) |