PC Review


Reply
Thread Tools Rate Thread

how to create a zoom butom in vba excel

 
 
vvv
Guest
Posts: n/a
 
      8th Oct 2009
hey guys how do I create a button (vba code) that upon each click changes the
zoom of the workshet?
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      8th Oct 2009
You can. Try
'to zoom out
ActiveWindow.Zoom = (ActiveWindow.Zoom-10)

to zoom in
ActiveWindow.Zoom = (ActiveWindow.Zoom+10)

If this post helps click Yes
---------------
Jacob Skaria


"vvv" wrote:

> hey guys how do I create a button (vba code) that upon each click changes the
> zoom of the workshet?

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      8th Oct 2009
You could record a macro to get the syntax and modify that recorded macro to do
what you want.

Then you could place a button from the Forms toolbar on the sheet and assign
this macro to the button.

But an alternative would be to add a couple of buttons to your favorite toolbar
(xl2003 and earlier).

In xl2003 menus:
Tools|Customize|Commands tab|View Category
Scroll down in the commands listbox until you see:
Zoom In
and drag it to your favorite toolbar
Do the same with Zoom out

I don't know if the same icons are available in xl2007 so that you can add them
to the QAT.

By putting these icons on your favorite toolbar (or QAT if available), you'll
have this functionality in all worksheets.


vvv wrote:
>
> hey guys how do I create a button (vba code) that upon each click changes the
> zoom of the workshet?


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create a zoom butom in vba excel vvv Microsoft Excel Programming 1 8th Oct 2009 07:10 AM
Please help! Print Preview Zoom is Grayed Out...Doesn't zoom. PK Microsoft Excel Misc 0 20th Jul 2009 03:33 PM
Re: How best can I create a panel which allows zoom on a drawing? Marc Gravell Microsoft C# .NET 1 9th May 2008 02:57 PM
Re: How best can I create a panel which allows zoom on a drawing? Chris Dunaway Microsoft C# .NET 0 9th May 2008 02:41 PM
How to create a zoom feature in Vb.Net Mo Ade via .NET 247 Microsoft VB .NET 2 10th Apr 2005 03:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:40 AM.