Forum Discussion
Compile error: Method or data member not found
- Jun 28, 2018
You had the code in a code module and a worksheet code module. If the code is in the worksheet module you can use syntax like:
Me.ListBox2.Value = ""
If you use a code module you have to specify the worksheet:
Sheets("Font Book").ListBox2.Value = ""
It looks like your code was duplicative. I removed the code module stuff and now it works fine (See attached)
You had the code in a code module and a worksheet code module. If the code is in the worksheet module you can use syntax like:
Me.ListBox2.Value = ""
If you use a code module you have to specify the worksheet:
Sheets("Font Book").ListBox2.Value = ""
It looks like your code was duplicative. I removed the code module stuff and now it works fine (See attached)
Am I understanding correctly that this error means that the sheet has not been called in prior code? I am attempting to plot a chart and am calling from a sheet called Basic Duck and am having an error pop up that says the method is not found. I previously had a range error but that has been corrected. I have not previously named the sheet in the code though if that needs to happen.