#1   Report Post  
Posted to microsoft.public.excel.misc
aftamath
 
Posts: n/a
Default Worksheet Names

I'm trying to have VBA list all of the worksheet names from a specified
workbook in the drop down list of a combobox. But I can't get the code to
work properly.

If fs.fileexists("c:\SymmcoPrograms\" & TextBox1.Value & "\" &
ComboBox1.Value & _
"\Charts.xls") Then
Set fa = CreateObject("Scripting.filesystemobject")
Set wkbChart = fa.GetFile("c:\SymmcoPrograms\" & TextBox1.Value &
"\" _
& ComboBox1.Value & "\Charts.xls")
For Each Sh In wkbChart.Sheets
ComboBox12.AddItem Sh.Name
Next
End If


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating Worksheet Names Tenaj Excel Worksheet Functions 16 January 13th 08 04:13 PM
Lookups using worksheet names Soapydux Excel Discussion (Misc queries) 3 November 6th 05 05:17 PM
Dynamic Worksheet Names Łukasz Czech Links and Linking in Excel 1 August 15th 05 10:41 PM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 06:21 AM
Indirect reference from one worksheet to another Bill Sturdevant Excel Worksheet Functions 2 December 17th 04 02:23 PM


All times are GMT +1. The time now is 04:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"