VBA routines - help please

R

Richard Wrigley

Greetings from Norfolk, UK
I am trying to create a 'accounts' routine that allows the user to select
first (A) what they want to do (enter sales, monthly account etc.) then (B)
to select the month that they wish to work on.
I used buttons to select the first (A), then the macro that runs from the
button (common to all three butons) to display the list box (B) to select
the month.
The problem is that I cannot find a way to save the information on which
button has been operated to start the process. The macro that runs from the
button (A) does not connect with the macro that runs FROM the pull down
list - they appear as two distinct routines.

I am runnig Excel 2000 should this be relevant to the solution.
--
Richard.

"I have yet to see any problem, however complicated, which when looked at in
the right way, did not become still more complicated"
Poul Anderson
 
L

lurker111

You have code that is in the "button_activate" section right? Create a
global variable in the workbook code (instead of saying "Dim int as integer"
you would use "Public int as integer") and have that variable set by each
individual buttons' "button_activate" code. When you get to the code for
your pull down list you then read the global variable to see what it was set
to for your if or case statements.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top