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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check exist namerange from excel in Access vba 1

Status
Not open for further replies.

heroddaji

Programmer
Aug 22, 2008
10
NL
Hi, i have a difficult problem

I have to check in a list of excel file, that if the excel file has a namerange, then i will import data from that excel's namerange to access data by vba code..... Quite hard for me.

For ex, I have a list of excel file name FILE 1 ... to FILE 10. and in each file, there will be a namerange WEEK1 in FILE1, then WEEK2 in FILE 2... but may be not(may be FILE3 doesn't have WEEK3). so i have to check.

Hope some expert can help me...
 
With EXFile being the Excel object and
Dim n
Dim DefNme as String
For Each n In EXFile.ActiveWorkbook.Names
DefNme = n.Name
Next n
This is a way to loop through all the defined names in the Excel workbook.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top