Form Log VBA 2013

owensy

New Member
Joined
Apr 17, 2015
Messages
10
Need help

Trying to create log using the visual basic function - Is it possible to create a drop down list for example showing the below using the

Private Sub ComboBox1_Change()

End Sub

Mechanical
Electrical
Hydraulic
Other

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Welcome to the forum give this ago.

Private Sub ComboBox1_Change()

ComboBox1.RowSource = "" 'Clear the list
ComboBox1.Clear 'Clear the selected text

With Me.ComboBox1
.AddItem "Mechanical"
.AddItem "Electrical"
.AddItem "Hydraulic"
.AddItem "Other"

End With

End Sub
 
Upvote 0
Cheers,

Still not working it's not referancing the box i have created on the visual basic screen ! any ideas ??
 
Upvote 0
Have you created a UserForm in the VBA screen and added a ComboBox as my suggested code would work there but I need to understand a little more of what you are trying to achieve and where you are working with the ComboBox. Is it actually the On Change Event you want or to load the list when the UserForm is activated?
 
Upvote 0
Hi,

Yes i have created UserForm in the <acronym title="visual basic for applications">VBA</acronym> screen and added a ComboBox, the fields i want displayed in the box are what i have givin you ! Yes thats correct i'm trying to Change Event to load the list when the UserForm is activated? I'm new to this so please bear with me !!

<tbody>
</tbody>
 
Upvote 0
Microsoft Access doesn't allow you to create UserForms within the VBA screen, so I am wondering if you are using Excel rather than Access? Please let me know so I can help further.
 
Upvote 0

Forum statistics

Threads
1,221,877
Messages
6,162,583
Members
451,776
Latest member
bosvinn

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