Hey guys.
I have an userform that comes from two others userforms.
I want to make an If that If comes from A happens one thing.
If comes from B happens other thing.
can u help me? thanksPlease Login or Register to view this content.
Hey guys.
I have an userform that comes from two others userforms.
I want to make an If that If comes from A happens one thing.
If comes from B happens other thing.
can u help me? thanksPlease Login or Register to view this content.
Declare a public variable in your form e.g.
then before showing form set its value...Please Login or Register to view this content.
then use If to check the sender name in Load event...Please Login or Register to view this content.
Please Login or Register to view this content.
Phew
This was awkward. I tried declaring a public variable but that didn't seem to help at all.
But I found two ways that did work.
First set a cell on a worksheet to be a flag.
Then you can use that flag to change the way your macro runs.Please Login or Register to view this content.
Alternatively you can use a text box or a label on the Two Calling Userforms as flags.
Setting a flag:-
Using A Flag:Please Login or Register to view this content.
Please Login or Register to view this content.
Sample Spreadsheet Attached.
Enjoy.
Sorry Just got the public variable working as well
So now you have 3 options. The Public variable being the easiest.
Well it's not working for me.
I created the labels for each and put everything as you did.Please Login or Register to view this content.
It is only working the "Else" part.
If I put
and thenPlease Login or Register to view this content.
[/CODE]Please Login or Register to view this content.
only the 2nd part works.
I've switched them and only the 2nd part works.
What's the ]If Left(Extrusão.Label7.Caption, 1) for ?
Cheers, thanks a lot
What's do happen when the form is called from A and what's to happen when it's B that does the calling?
If posting code please use code tags, see here.
problem solved ! solved the problem creating another userform to make it easier, thanks a lot dudes
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks