Change Form Size in VB with an OnClick

I have a subform that has a good amount of information on it.  It resides on a main form that has a bunch of data too.  Is there a way to put a command button in so that if the user clicks it the subform will grow to a specified size or something similar?  

Thanks for the help, and let me know if you require more information.
Who is Participating?
stevbeConnect With a Mentor Commented:
during runtime size is manipulated in Twips. 1440 Twips = 1 inch

Me.Width = 1440 * 7   '7 inches wide
Me.Height = 1440 * 5   '5 inched wide

jkorzConnect With a Mentor Commented:
set the subform object's .width and .height properties to whatever you want to change them to

example (inverts width and height):

Dim w as integer, h as integer

w = sfrm.width
h = sfrm.height
sfrm.height = w
sfrm.width = h
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.