[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • Last Modified:

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.
0
busbeead
Asked:
busbeead
2 Solutions
 
stevbeCommented:
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

Steve
0
 
jkorzCommented:
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
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now