Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List BoxExcel Query

Status
Not open for further replies.

beanxx

Technical User
Jul 9, 2002
61
GB
Hi,

For example I have three sheets labelled Sheet 1, sheet 2 and sheet 3. I then have a list box set up on a seperate sheet which pulls in information from the relevant sheet, depending on which sheet is picked from the list box, all well and good. However this only seems to work if the picklist values and therefore the sheets are labelled with an underscore as in Sheet_1, Sheet_2 and Sheet_3. Is there a way around this as I want to use the values Sheet_1, Sheet_2, etc, in a header but it looks a bit stupid with underscores in the body of the text. Perhaps I should use Replace or something to change Sheet_1 to Sheet 1, but I'm not sure how that work?

Thanks in anticipation,

Justin
 
Hi Justin,

VBA doesn't react very friendly with spaces " " in names of any kind. You will either have to continue to use the Underscore or RE-name your sheets to "Sheet1", "Sheet2" & "Sheet3".

Sorry if this is of no help.



If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
Thanks for this bowers 74, at least I know now!

Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top