View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
darkblue darkblue is offline
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.