Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 6
Default How to mention a particular sheet name while opening excel with VB script.

Hi Pls say me
1. How to mention a particular sheet name while opening excel with VB script.
2.how to know the rowcount and column count in excel using vb script.

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,942
Default How to mention a particular sheet name while opening excel with VB

hi
this is from a macro i use to use.
reference the file name and complete file path.

Workbooks.Open Filename:="S:\PUBLIC\AE-MRP40\DollarsByLoc40.xls"

row count....
dim lastrow as long
lastrow = cells(Rows.Count, "A").End(xlUp).Row
'where A is the column
msgbox lastrow
column count....
dim lastcol as long
lastcol = Cells(1, Columns.Count).End(xlToLeft).Column
'where 1 is the row
msgbox lastcol

regards
FSt1

"refina" wrote:

Hi Pls say me
1. How to mention a particular sheet name while opening excel with VB script.
2.how to know the rowcount and column count in excel using vb script.


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
How to mention a particular sheet name while opening excel with VB script. refina New Users to Excel 2 June 16th 08 10:50 AM
problem while opening the excel sheet karthik New Users to Excel 0 May 19th 08 10:20 AM
problem while opening the excel sheet karthik New Users to Excel 0 May 19th 08 07:18 AM
HOW TO LOCK THE OPENING OF AN EXCEL SHEET? Excel Locker[_2_] Excel Worksheet Functions 1 September 20th 07 03:40 PM
Opening an excel sheet but i don't see it Erwin Excel Discussion (Misc queries) 2 February 17th 05 02:00 AM


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