Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify excel userform controls through vbproject?
(Excel vX for Macintosh)
Does anyone know if it is possible to set properties of controls on an excel userform using the vbproject. I know I can set the textbox heights etc... at run-time, but as there are many changes I want to make to many controls I wonder if there is any quick way of doing this in the VB editor (without using the normal interface, which would be quite slow). I can get the userform as a vbcomponent using thisworkbook.vbproject.vbcomponents("formname") but I can't seem to do what I want with this. Is there any way of returning the userform object via the vbproject? Thanks David --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify excel userform controls through vbproject?
David,
You need to use the Designer object of the form. For example, the following will set the height of CommandButton1 to 48. With ThisWorkbook.VBProject.VBComponents("UserForm1").D esigner .Controls("CommandButton1").Height = 48 End With I have no idea is this will work on a Macintosh. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "daithimcc " wrote in message ... (Excel vX for Macintosh) Does anyone know if it is possible to set properties of controls on an excel userform using the vbproject. I know I can set the textbox heights etc... at run-time, but as there are many changes I want to make to many controls I wonder if there is any quick way of doing this in the VB editor (without using the normal interface, which would be quite slow). I can get the userform as a vbcomponent using thisworkbook.vbproject.vbcomponents("formname") but I can't seem to do what I want with this. Is there any way of returning the userform object via the vbproject? Thanks David --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify excel userform controls through vbproject?
Yes this works on the Macintosh. Thanks a lot - it does the job
perfectly. Is there a source you can recommend covering all of these more obscure features? Thanks again. David --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Getting a handle on Userform controls | Excel Programming | |||
Trouble w/ ActiveX Controls (no userform) Excel 2002. | Excel Programming | |||
Hyperlinks from UserForm Controls | Excel Programming | |||
Add controls to UserForm | Excel Programming | |||
load userform from other VBProject (Excel 2000) | Excel Programming |