ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   VBA - sub routines Help please (https://www.excelbanter.com/new-users-excel/119860-vba-sub-routines-help-please.html)

Richard Wrigley

VBA - sub routines Help please
 
Greetings from Norfolk
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.


--
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




Richard Wrigley

VBA - sub routines Help please
 
Greetings from Norfolk
I forgot to mention that I am running Excel 2000 should this be relevant

--
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




PapaDos

VBA - sub routines Help please
 
You seem to be using a button from the "Forms" toolbar.
If so,
application.caller
should give you the button's name...
--
Regards,
Luc.

"Festina Lente"


"Richard Wrigley" wrote:

Greetings from Norfolk
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.


--
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





CLR

VBA - sub routines Help please
 
What I would normally do in a situation like yours, is to have three
individual master macros for each of my major choices, A, B or whatever, and
have them do and control the things that are unique to that selection, and
to call up any universal macros if and when needed as a step in the
procedure..........but the master
selection macro would be in control until the exercize was completed.

hth
Vaya con Dios,
Chuck, CABGx3



"Richard Wrigley" wrote in message
...
Greetings from Norfolk
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.


--
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







All times are GMT +1. The time now is 05:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com