I've tried looking for a solution to this one, but just can't find anything with what I'm searching under.
I have a form with 2 boxes empty, awaiting user input.
The first box specifies which excel workbook to open, and the second box specifies which worksheet to goto once it has been opened.
On clicking on a button these 2 values are then passed into a module which opens the corresponding file.
It all works great, but how do I allow the lazy user to just enter data into the first box, and then leave the second box blank - allowing them to just open the workbook without having to specifiy the worksheet.
At the moment when I try to do this, it pops up with a type mismatch error as it is expecting to pass 2 values in, and can only find 1.
Can I somehow tell it to pass null if there is nothing there?
Or can I have another module that fills in any blank fields with some default value when the button is pressed?
I'm sure there is away to do, probably a simple way, but at the moment I can't find how.
Any, and all help much appreciated.
Thanks
I have a form with 2 boxes empty, awaiting user input.
The first box specifies which excel workbook to open, and the second box specifies which worksheet to goto once it has been opened.
On clicking on a button these 2 values are then passed into a module which opens the corresponding file.
It all works great, but how do I allow the lazy user to just enter data into the first box, and then leave the second box blank - allowing them to just open the workbook without having to specifiy the worksheet.
At the moment when I try to do this, it pops up with a type mismatch error as it is expecting to pass 2 values in, and can only find 1.
Can I somehow tell it to pass null if there is nothing there?
Or can I have another module that fills in any blank fields with some default value when the button is pressed?
I'm sure there is away to do, probably a simple way, but at the moment I can't find how.
Any, and all help much appreciated.
Thanks