Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform Control Change from Different Workbook
I would like to change a Userform Control value in a different
workbook before I load it from again, a different workbook. WorkbookA.xla - Contains said Userform. I do not want to change anyprogramming in this xla. I only want to reference a given userform control therein and change its value remotely. WorkbookB.xls - Will have the routine to change said control value, then show the form (already know how to do the later). This would be easy from all the same sheet. Any thoughts? Again, it is a contstraint that I cannot change the xla... just can't figure out how to address the object. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform Control Change from Different Workbook
Oh, and I'm trying to support both '03 & '07! Thanks again!
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Userform Control Change from Different Workbook
Unusual!
AFAIK not possible to access the form in the other book until its loaded, so you will need to add something to the other addin ' in a normal module, not headed Private in the xla Function GetUF() As UserForm1 Set GetUF = UserForm1 End Function ' in the calling workbook Sub test() Dim myForm As Object Set myForm = Application.Run("myAddin.xla!GetUF") myForm.Controls("CommandButton1").Caption = "Hello" myForm.Show End Sub If it's viable to set a reference to your addin, Set myForm = myAddinProjectName!GetUF") I would have thought much better to call a routine in the addin, pass arguments for new control properties, and have that routine load the form, do the changes and run the form. When done pass back any results to the calling workbook. Regards, Peter T "J Pietsch" wrote in message ... I would like to change a Userform Control value in a different workbook before I load it from again, a different workbook. WorkbookA.xla - Contains said Userform. I do not want to change anyprogramming in this xla. I only want to reference a given userform control therein and change its value remotely. WorkbookB.xls - Will have the routine to change said control value, then show the form (already know how to do the later). This would be easy from all the same sheet. Any thoughts? Again, it is a contstraint that I cannot change the xla... just can't figure out how to address the object. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change from userform view to excel workbook view | Excel Programming | |||
Selecting control on userform with part of control name (set question) | Excel Programming | |||
Control Sequence from Userform Control | Excel Programming | |||
Userform control | Excel Programming | |||
Userform control | Excel Programming |