Solved

Form expansion

Posted on 2009-03-30
5
129 Views
Last Modified: 2013-12-26
How to make up and down scroll bar to show the entire form of the project?
My project has a lot of command button that accommodate the entire form. I need to expand it but i do not know how? Please give me some ideas or example on how to make it...
Thanks
0
Comment
Question by:Whing Dela Cruz
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
You could put the controls on a frame and vary the value of the frame's Top property with the value of a vertical scroll bar.
0
 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
Another idea is to use a tab control and to group the controls on different tabs.
0
 

Author Comment

by:Whing Dela Cruz
Comment Utility
can you give me some examples? i do not know how to start it!
thanks!  
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
Comment Utility
OK. I will assume that you want to use the first suggestion.
Select the existing controls. Cut (Ctrl+X) them to the clipboard.
Place a large frame control on the form. Then paste (Ctrl+V) the orginal controls on to the frame. If necessary, you can adjust the frame height in the properties window so that it is larger than the form.

There isn't all that much code.
Option Explicit
 

Private Sub Form_Load()

    'Frame1 is larger than the form.

    'Let the scroll bar span the difference

    VScroll1.Max = Frame1.Height - Form1.ScaleHeight

End Sub
 
 

Private Sub VScroll1_Change()

    Frame1.Top = -VScroll1.Value

End Sub

Open in new window

0
 

Author Closing Comment

by:Whing Dela Cruz
Comment Utility
Thanks so much!
The code is working and i'm now starting my program..
thanks! more power!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now