Macro for Custom view

S

sushantbapna

Hello:

I have bunch of data on a excel spreadsheet - I am using custom view t
define different views - is there a way that I could have a macro (wit
a button) for each of the custom views so that user can just press th
respective view button and switch views.

Help would be apprecaited!

Thanks
Sushan
 
J

JulieD

Hi Sushant

Yes, probably the easiest way is to record a number of macros each
displaying one view (tools / macro / record new macro - save it in "this
workbook" and give it the name of your view).. perform the actions to
display the view and then click the stop recording button.

then when you've recorded all the macros
choose
view / toolbars / customise
i would probably create a new toolbar (toolbar tab, click new)

then choose the commands tab, scroll down to macros (on the left) drag the
smiley face to your new toolbar, right mouse click on it, change the name to
the name of the view, change the style to text only and then click on assign
macro - and choose the appropriate macro, repeat for all the macros.

when you're done, close the customise box.

hope this helps
Cheers
JulieD
 
S

sushantbapna

Thanks a lot Julie, that works, one more thing - is there a way to ge
buttons on the sheet instead of the toolbar?

Thanks
Sushan
 
J

JulieD

Hi

yes, i use the drawing toolbar to do this but you can use the button from
the control toolbar too ... whichever way, put the button on the sheet (if
you're using one from the drawing toolbar you can right mouse click on it to
add text) ... once you've placed the button where you want it, right mouse
click on it and choose assign macro - a list of all your macros will be
displayed, just choose the appropriate one and repeat for all :)

Cheers
JulieD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top