Help with VBA to create a guitar scale generator

Tgv10

New Member
Joined
Feb 5, 2023
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Hello.

Can anyone help me create an excel file to generate guitar scales. I've been looking on the internet for a file and found this one:

This is almost what I want but I would like to understand to make my own file with some adjustments. Does anyone know what I should look for? How do you use multiple buttons to trigger different macros? Are they comboboxes, userforms or what are they?.

Thanks.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Each button would have its own click event thus running its own code. One combo can take the place of many buttons by virtue of the chosen list item and is usually a better option than many command buttons or option buttons. I didn't download the file for those questions as I don't need a scale workbook file to provide that advice. At first I started to answer based on this being about fret scales so didn't see why such a thing would be of value, but then I figured it's about e.g. pentatonic type scales.
 
Upvote 0
Each button would have its own click event thus running its own code. One combo can take the place of many buttons by virtue of the chosen list item and is usually a better option than many command buttons or option buttons. I didn't download the file for those questions as I don't need a scale workbook file to provide that advice. At first I started to answer based on this being about fret scales so didn't see why such a thing would be of value, but then I figured it's about e.g. pentatonic type scales.
Do you have any suggestion for what should I search?
 
Upvote 0
Not really. "How to create userforms in Excel" ?
 
Upvote 0
Not really. "How to create userforms in Excel" ?
No. How to make a combobox in active x and assign a macro to each element in the combobox list. I know how to make the combobox and add elements to the combobox but I can't assign a macro to each element of the combobox.
 
Upvote 0
You can't - directly. But you can direct code execution by using one event (e.g. AfterUpdate event) and direct flow based on the selected list item. One way is a bunch of nested IF blocks, or an If...Then...Else type of decision. If there are a lot of list items, a Select Case block is often more efficient - at least in terms of writing code.
e.g.

VBA Code:
Select Case Me.myTextbox
  Case "dog"
      'do dog stuff
  Case "cat"
     'do cat stuff
  Case "bird"
    'do bird stuff
  Case etc
     'and so on
  Case Else 'handles all else
      'do else stuff
End Select
 
Upvote 0

Forum statistics

Threads
1,215,987
Messages
6,128,129
Members
449,425
Latest member
NurseRich

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top