Hi
Can anyone help me resolve an issue with the code below. I am getting a runtime error 1004, i highlighted the problem in the code. i am running excel 2007
i appreciate any help
Please Login or Register to view this content.
Hi
Can anyone help me resolve an issue with the code below. I am getting a runtime error 1004, i highlighted the problem in the code. i am running excel 2007
i appreciate any help
Please Login or Register to view this content.
The syntax works if the range contains valid names and data in the current region
Can you create the names manually using the same data?
Andy,
Thank you for replying, i tired to point it to the sheet, folder and range name, but it did not like RefersToRange and the .cells(i)..
I am using this code in the module, it is used with a main() to populate a combobox with one of 3 named ranges depending on a cell value. The main() an setNmaes are on the module, and the combobox and the named ranges are in sheet1.
Can you kindly help?
None of that makes sense, to me, in regards to the questions I asked.
post example file
Please Login or Register to view this content.
I think the problem with the code was the reference to combobox1 , which was not on the active sheet.
And the setting the ListFillRange range to the cell address rather than the name which had been created. With only the cells part it would have to relative to the sheet with the control on.
Thanks Andy, i agree i missed that.
I tried your code, but i am still getting a runtime error 1004
this selection is not valid
theTopLeft.CurrentRegion.CreateNames Top:=True, Left:=False, _
Bottom:=False, Right:=False
i suspect it is the refertorange not working, maybe i need an addin?
I am a novice, so i don't know what i am doing yet
Please help
If you are trying to run this from the command button on sheet3 then you will need to change the reference to Activesheet.
Please Login or Register to view this content.
Thank you Andy,
I am getting Error 1004 application-define or object define error from this: With theName.RefersToRange
this is what i have on the module after the changes you recommended
I think i am getting close, thanks to you. I hope you can help me figure it out
Please Login or Register to view this content.
So you did not bother to read the comment in the code?
' remaining code remove for brevity
Here is the full code
Please Login or Register to view this content.
Sorry, i misunderstood. (i read the comment, i just didn't understand it)
setNames is not defined in the Main()?
Please excuse my ignorance, but i am trying
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks