Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting a handle on Userform controls Howard Kaikow Excel Programming 2 November 18th 03 04:08 PM
Trouble w/ ActiveX Controls (no userform) Excel 2002. Chris Excel Programming 2 November 14th 03 06:36 PM
Hyperlinks from UserForm Controls Nigel[_5_] Excel Programming 3 November 1st 03 01:21 PM
Add controls to UserForm Vyyk Drago Excel Programming 3 August 26th 03 01:22 PM
load userform from other VBProject (Excel 2000) Keith Willshaw Excel Programming 1 July 28th 03 04:12 PM


All times are GMT +1. The time now is 09:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"