Hi Luciana, I suggest simple way, using data validation in excel.
Goto cell A1, assign data validation to it.
By pressing Alt + D then V & then L will invoke data validation menu.
Under Setting tab, under Allow select List. Keep Ignore blank & In cell
dropdown as checked.
Under source type macro1,macro2,macro3
Press Ok to accept change.
macro1 is name of first macro & like wise macro2 & macro3.
Now press Alt + F11 to open VB editor.
Doble click on sheet 1 & paste following code:
'code begins:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target <> Range("A1") Then Exit Sub
Select Case Target
Case "macro1"
macro1
Case "macro2"
macro2
Case "macro3"
macro3
'etc
Case Else: Exit Sub
End Select
End Sub
'code ends
Now press Alt + I then M to add new module & paste below code:
'code begins:
Sub macro1()
MsgBox "you selected to run Macro 1"
End Sub
Sub macro2()
MsgBox "you selected to run Macro 2"
End Sub
Sub macro3()
MsgBox "you selected to run Macro 3"
End Sub
'code ends
Press Alt + F4 to close VBE.
Now goto cell A1 & select data from combo box.
when you select macro1, code associated with it will run & so on,
Here i have used worksheet change event to capture value in Cell A1 & call
macro accordingly.
I have attached example workbook for your reference.
Cheers!!
+++++
*I did not do this for you. God is here working through me for you.*
On Thu, Oct 30, 2014 at 3:09 PM, luciano de souza <[email protected]>
wrote:
> Hello all,
>
> I want to create several subrotines: macro1, macro2, macro3, macro4...
> And I want to select one of then in a dialog box.
>
> I could add a form and add a combobox to the form. Each item of the
> combo would be associated to a different subrotine. This could be a
> solution for most people, but not for me.
>
> I am blind and I use computer by means of a screen reader. The
> construction of forms requires to copy and paste objects, positioning
> then on the screen. This is a task not possible to do with a screen
> reader.
>
> But I know there is a simple dialog listbox, standard in Windows,
> similar to msgbox or input box, that could be useful for me in this
> case. Probabily, it's something available in user32.dll.
>
> My question is: does someone know how to call it?
>
> The ideia is: a main macro is called by means of keystroke. A simple
> listbox is shown. With arrows, I select an item corresponding to
> another defined macro.
>
> What do you can say about it?
>
> Best regards,
>
>
> --
> Luciano de Souza
>
> --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/d/optout.
>
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like Please Help,
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed to the Google Groups "MS
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.
VBA run macro on target change.xlsb
Description: application/vnd.ms-excel.sheet.binary.macroenabled.12
