I am attempting to build an interactive document where users can pick from a drop down and a display would show up based on the item picked from the drop down.
Sub ComboBox1_Change() ‘this would be the drop down menu for the user to choose from.
With ComboBox1
.AddItem "AA"
.AddItem "BB"
.AddItem "CC"
End With
End Sub
Sub TextBox1_Change()
If ComboBox1.Value = "AA" Then
TextBox1.Text = "11"
ElseIf ComboBox1.Value = "BB" Then
TextBox1.Text = "22"
ElseIf ComboBox1.Value = "CC" Then
TextBox1.Text = "33"
End If
End Sub
I am having a hard time understanding where to write the code if this document will be passed around (via email) so that all users from different computers can use it.
Would I need to create a UserForm under Forms? Have it under Microsoft Objects? Have it defined as Macros in Modules?
Extra Questions
If this is going to be placed inside Word, can I possibly link it from Excel (to extract data or validate data)?
What would be the difference between Private Sub, Public Sub, and Sub?
Sub ComboBox1_Change() ‘this would be the drop down menu for the user to choose from.
With ComboBox1
.AddItem "AA"
.AddItem "BB"
.AddItem "CC"
End With
End Sub
Sub TextBox1_Change()
If ComboBox1.Value = "AA" Then
TextBox1.Text = "11"
ElseIf ComboBox1.Value = "BB" Then
TextBox1.Text = "22"
ElseIf ComboBox1.Value = "CC" Then
TextBox1.Text = "33"
End If
End Sub
I am having a hard time understanding where to write the code if this document will be passed around (via email) so that all users from different computers can use it.
Would I need to create a UserForm under Forms? Have it under Microsoft Objects? Have it defined as Macros in Modules?
Extra Questions
If this is going to be placed inside Word, can I possibly link it from Excel (to extract data or validate data)?
What would be the difference between Private Sub, Public Sub, and Sub?