![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 67
|
I have a VBA code and I want the code to be run by different workbooks separately and not depend on other workbook.
I've created a button in a toolbar to run the code. However, the button depends on the workbook which the code is last assigned. Is there a way to create the button so the macro can run on each workbook separately?? Please Help Thanks in advance |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
Hi Mate
I would suggets a switchboard.. thats a userform to Excel users,, assign whatever you nne to each command button and just one icon on tool bar pulls up userform.. the worlds you oyster then......
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 67
|
Are you saying that I should create 8 buttons if I have 8 workbooks and assign the macro to those 8 buttons according to those workbooks?
Sorry I don't think I really get your answer. Can you explain a little bit more please Thanks in advance |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 3,065
|
/////I have a VBA code and I want the code to be run by different workbooks separately and not depend on other workbook.
OK a button for each might not be ideal but give 100% control over things... .......I've created a button in a toolbar to run the code. Assign this to pull up the userform .... ///////However, the button depends on the workbook which the code is last assigned. This method matter little you choose which to run REGARDLESS thus 100% control.. makes the code sdmall and bitty but editable easly. ////Is there a way to create the button so the macro can run on each workbook separately?? Of casue as you say assign as many command buttons to each shhet as needed 1 or 100 matters not.. i even have buttons to pull up dioalog which mention storys of old pals and dead friends.. in memory .. you can do as you please from user form.. add bits and snips as you want.. easy work once you get the hang.. Click toolbar up pops user form select code to execute... Thats it... Name each button for ease of reference....
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|