Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How to find sheet names without opening files

Hello,
Is there a way to the name of the first sheet of each excel file in a
given folder. I know how to do this by opening each file, but I'd
like to be able to do it without opening each file.

thanks,
Andy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to find sheet names without opening files

Andrew brought next idea :
Hello,
Is there a way to the name of the first sheet of each excel file in a
given folder. I know how to do this by opening each file, but I'd
like to be able to do it without opening each file.

thanks,
Andy


You can do this using ADO. You'll find a working example he

http://www.appspro.com/Tips/WorkbookTips.htm#WT1

under this Q:

How Can I Get a List of Worksheet Names From a Closed Workbook?

HTH

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default How to find sheet names without opening files

On Jul 12, 10:01*am, GS wrote:
Andrew brought next idea :

Hello,
Is there a way to the name of the first sheet of each excel file in a
given folder. *I know how to do this by opening each file, but I'd
like to be able to do it without opening each file.


thanks,
Andy


You can do this using ADO. You'll find a working example he

*http://www.appspro.com/Tips/WorkbookTips.htm#WT1

under this Q:

* How Can I Get a List of Work


That looks perfect. Thank you again Garry. I appreciate your help.

Andy
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to find sheet names without opening files

Andrew has brought this to us :
On Jul 12, 10:01*am, GS wrote:
Andrew brought next idea :

Hello,
Is there a way to the name of the first sheet of each excel file in a
given folder. *I know how to do this by opening each file, but I'd
like to be able to do it without opening each file.
thanks,
Andy


You can do this using ADO. You'll find a working example he

*http://www.appspro.com/Tips/WorkbookTips.htm#WT1

under this Q:

* How Can I Get a List of Work


That looks perfect. Thank you again Garry. I appreciate your help.

Andy


You're welcome! Glad to help...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default How to find sheet names without opening files

Hi Garry

I receive a message when i click "getsheetnames" button.
What am i missing here ? Shall i have to install something?

The code is:
If Application.Version < 12 Then
szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
szFullName & ";Extended Properties=Excel 8.0;"
Else
szConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
szFullName & ";Extended Properties=Excel 8.0;"
End If

Set objConnection = New ADODB.Connection
objConnection.Open szConnect <<<<<<<<<<<< Here, it hangs.

And the message is:
"Provider cannot be found. It may not be properly installed"

Thank you.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default How to find sheet names without opening files

on 7/13/2011, darkblue supposed :
Hi Garry

I receive a message when i click "getsheetnames" button.
What am i missing here ? Shall i have to install something?

The code is:
If Application.Version < 12 Then
szConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
szFullName & ";Extended Properties=Excel 8.0;"
Else
szConnect = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
szFullName & ";Extended Properties=Excel 8.0;"
End If

Set objConnection = New ADODB.Connection
objConnection.Open szConnect <<<<<<<<<<<< Here, it hangs.

And the message is:
"Provider cannot be found. It may not be properly installed"

Thank you.


It requires the necessary data provider for your particular version of
Excel. Check in the VBEToolsReferences dialog to make sure you have
either JET4.0 OR ACE12.0 installed. These should have been installed
when you installed MS Office, but may not be installed if your machine
is subject to IT rules for software installation.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
Opening files with variable names Brad Excel Programming 1 March 5th 09 11:20 AM
Macro for opening files that changes names [email protected] Excel Discussion (Misc queries) 1 May 12th 07 06:15 PM
How to find/replace all of the names of files in EXCEL workbook. Peter Multach Excel Discussion (Misc queries) 2 March 5th 07 02:52 PM
Disable find files error message for missing links on opening WB RAZA Excel Discussion (Misc queries) 3 May 10th 06 12:32 PM
VBA for opening file/populating combo box with sheet names Sinobato[_4_] Excel Programming 3 July 26th 04 06:35 PM


All times are GMT +1. The time now is 05:36 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"