Please Please Please Help Me
Posted by Jason Meredith on January 04, 2000 3:12 PM
Hi there,
I have to tell you that my brain is completely frazzled trying to do a VBA project in Excel for college. I have done a little VB before so I have attempted to code VBA for Excel with the help of the macro recorder. The thing is I've got the hard part done, and I've set up a form that does what I want it to. I have however run up against the three problems below.
1. How do you do a conditional test to see if the user has selected a certain worksheet in a workbook? I have code I want to run if one sheet is selected but not if another sheet is selected.
2. How do you load up a form from a sub procedure? I want to code a form to open when a keyboard shortcut is pressed, so I set a sub procedure that calls the form from a module but this doesn't work (I just don't know the syntax).
3. How do get a form to close when its job is done or the Cancel button is pressed without going back into the VB editor (i.e. after it closes to remain in Excel)? Do I need to compile the form in VBA? I have tried End and Unload Me but these take me back into the Visual Basic Editor again when I want to stay in Excel.
I know that I should really get a book and read up but I haven't had the time. These are probably basic questions but, as I have said, it is the first time that I have tried VBA and I don't quite know the Excel syntax. If anyone could help I would greatly appreciate it. Thanks,
Jasy M.