Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a macro to a worksheet (vs personal.xls)
Is there a way to assign a worksheet to a button _within_
an Excel spreadsheet? The reason I ask is because I know how to deal with those types of macros. I carry around on a floppy all my toolbars and templates and the personal.xls file and know where to "install" these in the contracts I go to. I'd like to create a db type of spreadsheet for the contract I'm in now (they don't want me to 'waste' time on creating a db in Access. Since the data being tracked is simple enough for this job IF I could "automate" it with 2 macros (so that it would simulate a very simple db solution), this is do-able if I can assign a macro somehow to the spreadsheet itself so that whoever accesses the file can use it. That would not be the case if the macro were to be saved externally from the file itself. I've seen complexe games done in Excel so I know it's pretty powerful. Just hoping it's powerful in this way! <g Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a macro to a worksheet (vs personal.xls)
I'm lost <lol!!
I was doing so well, too!! I created the macro I needed. I created the button and that seemed fine. I set it so that it won't move with cells, etc., but what I can't find is how to assign the macro. I chose the "Command Button" option from the "Control Toolbox". I don't know if this was the right button as this wasn't specified but it seemed the best one. But maybe that's what's wrong (?). When I right-click, there is no "Assign Macro" option. If I double-click the Command Button I go into the VB editor (or what looks like that to me) but I can't seem to figure out how to assign the previously saved macro to this button? [A question re the button, can we put an icon on the button like we do the ones on the toolbar? I like to create my own, etc.] Lastly, I never figured out what you meant by "drag to the toolbar". The button stays within the rulers of the Excel spreadsheet and refuses to go "outside" of that area onto any toolbar. Again, I think I'm doing something wrong! Thanks for all this so far, though, Jason! I've learned a lot. Cheers! -----Original Message----- Add a "Button" to the spreadsheet. Right click on the ToolBar and choose Control Toolbox. You will see the button there. Drag it to the toolbar. Then add the button to the spreadsheet. Right click the button and choose, Assign Macro. Tip: You may want to go into Format Control and under the Properties click Dont move or size with cells.. Hope this helps.. Jason . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a macro to a worksheet (vs personal.xls)
Bridget wrote
I chose the "Command Button" option from the "Control Toolbox". I don't know if this was the right button as this wasn't specified but it seemed the best one. But maybe that's what's wrong (?). Use one from the Forms toolbar instead. That one has the right-click|Assign Macro option as opposed to one from the Controls toolbar (it uses button_click code). -- David |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a macro to a worksheet (vs personal.xls)
On Thu, 13 May 2004 13:13:16 -0700, David
wrote: Bridget wrote I chose the "Command Button" option from the "Control Toolbox". I don't know if this was the right button as this wasn't specified but it seemed the best one. But maybe that's what's wrong (?). Use one from the Forms toolbar instead. That one has the right-click|Assign Macro option as opposed to one from the Controls toolbar (it uses button_click code). OMG, that is just so utterly incredible! And it took a mere moments to do! It's amazing how all the functions/features resemble db creation! I was able to use the same ideas and techniques! I could even put an icon on the button just like I would in Filemaker! Totally awesome! I also saved the macros to the worksheet itself. I'd never done that before. I usu. make global ones to the personal.xls file so never really noticed that you could save to a sheet itself! This makes it ideal! There is just one last thing which I hope to do before calling this quits: I'm just no good at VB. I can't get a handle on it (though I'm good at following clear instructions <lol!). Is there a way to put in an "open print dialogue box" command as a last thing to do for a print command macro? And, if so, is it hard to code? This way, the print button will do the sort necessary before printing but then will open the print dialogue box for the user. <fingers crossed I hope there's an easy way to do this. I was doing that sort of thing in WordPerfect as long ago as 1998 (if not in earlier versions) so hoping that I can do that in the macro language of Excel. If that is possible, then every time I get sent to a contract and they want me to track data yet won't allow me to create a db and absolutely want me to use Excel (THEY DO do that to me!!), then I can get around spreadsheet limitations by creating macros that users can access via buttons!! And sorting and doing certain things before printing seem to be one of the most common things one needs to do. This is exciting!! Thank you! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assigning a macro to a worksheet (vs personal.xls)
If all you want to do is display the Print dialog, use the
following line of code: Application.Dialogs(xlDialogPrint).Show -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "StargateFan" wrote in message ... On Thu, 13 May 2004 13:13:16 -0700, David wrote: Bridget wrote I chose the "Command Button" option from the "Control Toolbox". I don't know if this was the right button as this wasn't specified but it seemed the best one. But maybe that's what's wrong (?). Use one from the Forms toolbar instead. That one has the right-click|Assign Macro option as opposed to one from the Controls toolbar (it uses button_click code). OMG, that is just so utterly incredible! And it took a mere moments to do! It's amazing how all the functions/features resemble db creation! I was able to use the same ideas and techniques! I could even put an icon on the button just like I would in Filemaker! Totally awesome! I also saved the macros to the worksheet itself. I'd never done that before. I usu. make global ones to the personal.xls file so never really noticed that you could save to a sheet itself! This makes it ideal! There is just one last thing which I hope to do before calling this quits: I'm just no good at VB. I can't get a handle on it (though I'm good at following clear instructions <lol!). Is there a way to put in an "open print dialogue box" command as a last thing to do for a print command macro? And, if so, is it hard to code? This way, the print button will do the sort necessary before printing but then will open the print dialogue box for the user. <fingers crossed I hope there's an easy way to do this. I was doing that sort of thing in WordPerfect as long ago as 1998 (if not in ear lier versions) so hoping that I can do that in the macro language of Excel. If that is possible, then every time I get sent to a contract and they want me to track data yet won't allow me to create a db and absolutely want me to use Excel (THEY DO do that to me!!), then I can get around spreadsheet limitations by creating macros that users can access via buttons!! And sorting and doing certain things before printing seem to be one of the most common things one needs to do. This is exciting!! Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
assigning macro | Excel Discussion (Misc queries) | |||
Personal macro workbook and personal.xls | Excel Discussion (Misc queries) | |||
How do I get my personal macro worksheet to open whenever I open . | Excel Discussion (Misc queries) | |||
personal.htm & personal.xls in Macro | Excel Programming |