TheDadliestDad
New Member
- Joined
- Feb 17, 2022
- Messages
- 5
- Office Version
- 365
- Platform
- Windows
Hello!
I want to say I'm missing something very small here, but I could be wrong, haha. Basic backstory here is that I am trying to build a Kanban system for our machine parts. I'm building a skeleton of the logic to get the proof of concept across to my team, but I'm running into a weird issue at my first ElseIf statement.
Here is what my GUI looks like that I've created:
Here is my VBA Code:
For this proof of concept I'm trying to just get a different message to display when each radio button is selected and the go button is clicked. As an example:
The above message box displays when I have the first radio button selected, but when I have either of the other two selected I get an error shown below...
If anyone can help I would greatly appreciate it. I'm not unfamiliar with vba in excel, but it's been a little while since I used it last.
Thank you!
I want to say I'm missing something very small here, but I could be wrong, haha. Basic backstory here is that I am trying to build a Kanban system for our machine parts. I'm building a skeleton of the logic to get the proof of concept across to my team, but I'm running into a weird issue at my first ElseIf statement.
Here is what my GUI looks like that I've created:
Here is my VBA Code:
VBA Code:
Private Sub ExecuteButton_Click()
Dim database As ListObject
Dim FoundBin As Range
Dim LookupBin As String
Worksheets("Database").Activate
Set database = ActiveSheet.ListObjects("Database")
If optTakingPart.Value Then
'do taking a part logic
MsgBox "You are Taking a Part"
ElseIf optAddingPart.Value Then
'do adding a part logic
MsgBox "You are Adding a Part"
ElseIf optFindMyPart.Value Then
'do finding a part logic
MsgBox "You are Finding a Part"
End If
Worksheets("GUI").Activate
TextBox1.Text = ""
End Sub
For this proof of concept I'm trying to just get a different message to display when each radio button is selected and the go button is clicked. As an example:
The above message box displays when I have the first radio button selected, but when I have either of the other two selected I get an error shown below...
If anyone can help I would greatly appreciate it. I'm not unfamiliar with vba in excel, but it's been a little while since I used it last.
Thank you!