remote writing to userforms

  • Thread starter Thread starter tad_wegner
  • Start date Start date
T

tad_wegner

I am trying to write to a userform from a macro. Consequently, the
userform is a part of a macro of another workbook (workbook-B).

I wrote a macro in workbook-A... it activates a macro in workbook-B.
Part of workbook-B's subroutine opens a userform that requires addition
info. I have the data to populate the userform, but do not know how to
insert the data into the userform from the macro in workbook-A.

Anyone have any experience here?
 
You could pass the values to tye macro as arguments, and then use those
value as properties in the userform and load there.

Workbook A

Application.Run "WorkbookB.xls!that_macro", 4,8

Workbook B
Standard module

Sub that_macro(a,b)
Userform1.Value1 = a
Userform1.Value2 = b
Userform1.Show
End Sub

Userform

Public Value1 as Long
Public Value2 As Long
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top