Accessing Excel sheets from VB5 
Author Message
 Accessing Excel sheets from VB5

Just an easy one I'm sure. Please could you tell me how to select
worksheets from a VB program.

I know from VBA you can use sheets("[sheet name]").select

but a VB5 program is sitting outside of Excel, so how do tell VB that
you want to select a sheet being run in another application.

Do I need to have the sheet open first, this is no problem.

Please Help

Thankyou in advance :-)

Danny



Sat, 27 Apr 2002 03:00:00 GMT  
 Accessing Excel sheets from VB5
assuming....
Dim xlApp As Excel.Application
Set xlApp = New Excel.Application

then....

xlapp.Workbooks.Open myfilename
xlApp.Sheets("New Development Projects").activate

- well, it worked for me ok

Patrick ( PS Excel 97 & VB6 )

On Tue, 09 Nov 1999 12:47:55 +0000, Danny Blanchette

Quote:

>Just an easy one I'm sure. Please could you tell me how to select
>worksheets from a VB program.

>I know from VBA you can use sheets("[sheet name]").select

>but a VB5 program is sitting outside of Excel, so how do tell VB that
>you want to select a sheet being run in another application.

>Do I need to have the sheet open first, this is no problem.

>Please Help

>Thankyou in advance :-)

>Danny



Sat, 27 Apr 2002 03:00:00 GMT  
 Accessing Excel sheets from VB5
Superb. Thanyou ever so much. I hope I can help you, with your next
problem...or are you one of those who never gets themselves into problems?

He he

Thankyou again

Quote:

> assuming....
> Dim xlApp As Excel.Application
> Set xlApp = New Excel.Application

> then....

> xlapp.Workbooks.Open myfilename
> xlApp.Sheets("New Development Projects").activate

> - well, it worked for me ok

> Patrick ( PS Excel 97 & VB6 )

> On Tue, 09 Nov 1999 12:47:55 +0000, Danny Blanchette

> >Just an easy one I'm sure. Please could you tell me how to select
> >worksheets from a VB program.

> >I know from VBA you can use sheets("[sheet name]").select

> >but a VB5 program is sitting outside of Excel, so how do tell VB that
> >you want to select a sheet being run in another application.

> >Do I need to have the sheet open first, this is no problem.

> >Please Help

> >Thankyou in advance :-)

> >Danny



Sat, 27 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help displaying Excel sheet with VB5 - Please.

2. Need help displaying Excel sheet with VB5 - Please.

3. Linking Excel sheets in VB5

4. Creating Excel sheets from VB5

5. Need help displaying Excel sheet with VB5 - Please.

6. Embedding Excel Sheet in a VB5 application

7. Creating an Excel sheet from VB5 Enterprise

8. Close and Save Excel Sheet from Access

9. Populate EXCEL Spread Sheet from ACCESS

10. Access OLE object insert Excel sheet

11. Using Excel workbooks and sheet from Access

12. Access opening Excel sheet in visual basic design mode

 

 
Powered by phpBB® Forum Software