Good morning,
I have created a VBA reporting tool using a VBA Userform and as its become really useful, I have now been asked to recreate another just like it for another of the companies in our group and then have a front end dashboard that allows you to select the company you want and it then opens up that particular workbook.
I have managed to get the workbooks to open and close but as they both have Userforms which should open when the workbook is started, yet on the company workbook (2nd spreadsheet, opened by the first) it loads the worksheet but not the userform.
The original workbook that is now used to open the individual company workbook is fine and that displays the Userform on opening and closes on command, but how do I force the 2nd sheet to display the userform rather than the actual spreadsheet?
I have tried setting the Workbook Open command to display the Userform and that works if I open the workbook myself manually but not when done via VBA code.
I have set the ShowModal as false on both Userforms thinking that might be an issue, but still no luck and I am sure its something simple, yet for the life of me I just cant work it out.
I hope that all makes sense?
For ease lets say the workbook with the buttons to select the company you want is Workbook 1 and the actual Company spreadsheet is Workbook 2 and they are currently saved in the same folder at the moment.
Any suggestions would be appreciated?
This is the code for the company sheet (Workbook2), reporting tool v1 being the original that closes (Workbook1), when this sheet opens:
Thanks
Mark
I have created a VBA reporting tool using a VBA Userform and as its become really useful, I have now been asked to recreate another just like it for another of the companies in our group and then have a front end dashboard that allows you to select the company you want and it then opens up that particular workbook.
I have managed to get the workbooks to open and close but as they both have Userforms which should open when the workbook is started, yet on the company workbook (2nd spreadsheet, opened by the first) it loads the worksheet but not the userform.
The original workbook that is now used to open the individual company workbook is fine and that displays the Userform on opening and closes on command, but how do I force the 2nd sheet to display the userform rather than the actual spreadsheet?
I have tried setting the Workbook Open command to display the Userform and that works if I open the workbook myself manually but not when done via VBA code.
I have set the ShowModal as false on both Userforms thinking that might be an issue, but still no luck and I am sure its something simple, yet for the life of me I just cant work it out.
I hope that all makes sense?
For ease lets say the workbook with the buttons to select the company you want is Workbook 1 and the actual Company spreadsheet is Workbook 2 and they are currently saved in the same folder at the moment.
Any suggestions would be appreciated?
This is the code for the company sheet (Workbook2), reporting tool v1 being the original that closes (Workbook1), when this sheet opens:
Thanks
Mark