Hi,
I've drawn a bit of a blank with this one.
I would like to assign a form username to a variable that I can then reference from another module. The reason for this is that I have a few userforms that are slightly different in terms of content and layout but share many similarities in function. To keep everythign a bit neater i'd like to hold most of the 'doing' code within a module and then call it as required from the userform code.
I understand that I can .show a userform via this method, but not sure if it's possible to reference it for other purposes - e.g. populating a combobox list.
The code setup I have at present:
Userform (TransForm1):
Module1:Please Login or Register to view this content.
This in itself doesn't trigger any runtime errors (though it does trigger the userform initialise event again when it reaches 'Set CurrForm', I have a bit of code to work around that) but when it comes to the Case Select statement it doesn't register any of the cases as true - leading me to suspect that it isn't carrying over the Userform name properly. This code ran fine when the POSType sub was within the userform module.Please Login or Register to view this content.
So any ideas? Can it be done? Or do I need to just copy and paste the code and live with it being messy?
Bookmarks