Home » Category » Microsoft Visual Basic

Microsoft Visual Basic: Zooming Function in VBA

104| Fri, 30 Nov 2007 01:39:00 GMT| davidgottlieb| Comments (1)
Is there a way that I can create 2 buttons that will will zoom in on my form. I am using a user form in VBA and about 8,000 people will be using it. Not everyone's screen resolution is the same so I need to create some zoom buttons so they can fit it to their liking. So can I create two buttons: one that will zoom in at increments of 5. and one that will zoom out in increments of 5? What is the code for that. Thank you for your help.

Keywords & Tags: zooming, function, vba, microsoft, visual basic

URL: http://www.programmerbase.com/visual-basic/560797/
 
«« Prev - Next »» 1 helpful answers below.
Is this David Gottlieb in Cleveland?

Maybe use a routine like

Dim c as control
For each c in myForm.controls
c.height = c.height * 0.95 '5% smaller
c.width = c.width * 0.95
Next c

But then you have to move all controls 5% closer to each other as well... Maybe working with reference to 0,0?

[Edited by RoyceWindsor1 on 09-07-2000 at 11:12 AM]

hbb | Tue, 04 Dec 2007 11:59:00 GMT |

Microsoft Visual Basic Hot Answers

Microsoft Visual Basic New questions

Microsoft Visual Basic Related Categories