How can i refer to two UserForms with same name in Workbooks

G

Guest

Guest
Can you suggest a way? The two userforms UserForm1 are in different Workbooks but both are open.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
So you mean almost no way to do so? I have thought of that after i spent much time on the help files. But ... it is a problem of referring to userform when there are multiple ones.
 
Upvote 0
Well I don't know if it's impossible or not, to be honest it's not something I've ever looked into, but when I had the same situation a little while ago, I just changed the name of one of them to Userform11

I'm sure it's possible though, just a shame that no-one here seems to know
 
Upvote 0
Also i found that the controls in a UserForm is not so easy to handle.
My codes such as
ComboBox1.RowSource = "'Sheet1'!AA1:AA" & lastUsedRow
ComboBox1.Value = Range("AA" & lastUsedRow).value

cannot work. I also tried to use With...End With
The userForm rowSource is not changed at all. Why?
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,254
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top