Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA and Macola Buttons

Status
Not open for further replies.

capone67

Programmer
Nov 6, 2000
115
CA
Does anyone know of a way to activate and position buttons on a Macola form using VBA?

Ken
 
By activate do you mean - enable. In other words have the button not visible or not enabled and on certain events make the button visible and enabled?

If so then

With buttonname
.visible = true
.enabled = true
End with

As for placing it at a certain position on the form. I have never tried to change the position but you could try....

With buttonname
.visible = true
.enabled = true
.top = xxxx (representing the pixel position of the top from the top of the form.)
.left = xxxx (representing the pixel position of the left of the button from the left of the form.)
End with


Let me know if it works. I know the visible and enabled work I usually place the button on the form and size it to the desired size and just disable it. I have had no real reason to move or resize a button.

Andy


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top