Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default vb.net calling worksheet by name

Barnie,
Don't know about .Net, but VB/VBA would require a Workbook object, not just
the word "workbook", or use 'ThisWorkbook". And the use of "Set", because
the variables are objects.
Dim WB as Workbook
Dim MyWorkSheet as Worksheet

Set WB=Workbooks.Add
Set Myworksheet =WB.Worksheets("Sheet3")

NickHk

"Barnie" wrote in message
...
Hi all,
Does any one know how to call a spread sheet by name?

I tried

Myworksheet = workbook.worksheets("Sheet3")

But that doesn't work. Everything else on my code is working fine except
that. Am I missing anything?

Thank you!


Barnabas (Barnie) Yohannes
http://www.geocities.com/barnabas_yohannes
"So powerful is the light of unity that it can illuminate the whole earth"




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
CALLING MACROS FROM A NEW WORKSHEET NSNR Excel Discussion (Misc queries) 4 February 1st 08 07:10 AM
calling up information from a different worksheet. Jay Adams Excel Worksheet Functions 0 October 8th 06 09:33 AM
calling VBA function within a worksheet matelot Excel Programming 2 March 20th 06 06:45 PM
Calling a worksheet via a codename Thierry Paradis Excel Programming 2 March 2nd 06 02:41 PM
Calling a different worksheet??? Tywardreath Excel Programming 3 December 14th 05 09:56 PM


All times are GMT +1. The time now is 07:37 PM.

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"