I've created a combobox in an Excel sheet and named it "GraphChoice". It's located in a sheet named "Choose Graph"
In VBA I'm trying to fill it with data using this code:
Sub Choose_graph_and_date()
Dim Graph As Worksheet
Dim FormInfo As Worksheet
Set Graph = Worksheets("Choose Graph")
Set FormInfo = Worksheets("Forminfo")
Graph.Activate
Graph.GraphChoice.List = FormInfo.Range("A1:A3").Value
End Sub
I get an error saying Can't find method. I've also tried.
GraphChoice.List = FormInfo.Range("A1:A3").Value
Then I get error 424. Object Required.
The code is in the ThisWorkbook module since I want it to load every time you open the workbook.
Anyone knows whats wrong?
Name
property and the(name)
property. Which property did you update toGraphChoice
? – Samuel EversonGraphChoice
the name of the combobox? Is it an ActiveX control or a Form control? – JNevill(Name)
property toGraphChoice
. – Samuel Everson