VB (for excel) question
#1
very easy, as ever.
1) I need to capture the excel tab name in a certain macro. I have tried stuff like..
x = sheets("sheet1").name
and other stuff, but nothing works.
What is the correct command , please.
2) I would like to capture the (approx) excel file size, that one can see under File, Properties, General.
What is the correct command for this too, please.
airhead
1) I need to capture the excel tab name in a certain macro. I have tried stuff like..
x = sheets("sheet1").name
and other stuff, but nothing works.
What is the correct command , please.
2) I would like to capture the (approx) excel file size, that one can see under File, Properties, General.
What is the correct command for this too, please.
airhead
#4
just tried..
x = ActiveSheet.Name
..which works, but I thought I tried that at work, oh well.
still wouldn't mind the answer to the memory question if anyone knows.
When I said 'capture', I just want to let the variable (eg var x) equal the desired 'value/name', so that I can do something with the 'captured' value/name.
I'm just creating a 'lazy mans macro' that records info from large excel files (25-30mb, yes 3 of them) and pastes into a new workbook. When you have 200 records, the tab name helps id problems. It certainly beats recording the info by hand, or constantly toggling between sheets !
airhead
[Edited by airhead - 11/22/2001 8:20:56 PM]
x = ActiveSheet.Name
..which works, but I thought I tried that at work, oh well.
still wouldn't mind the answer to the memory question if anyone knows.
When I said 'capture', I just want to let the variable (eg var x) equal the desired 'value/name', so that I can do something with the 'captured' value/name.
I'm just creating a 'lazy mans macro' that records info from large excel files (25-30mb, yes 3 of them) and pastes into a new workbook. When you have 200 records, the tab name helps id problems. It certainly beats recording the info by hand, or constantly toggling between sheets !
airhead
[Edited by airhead - 11/22/2001 8:20:56 PM]
#5
Airhead,
In reply to your second question, use the command FILELEN(pathname).
This returns a long amount in bytes of the file.
e.g.
Dim lFileLength as long
lFileLength = FILELEN(c:\winnt\win.ini)
Martin.
In reply to your second question, use the command FILELEN(pathname).
This returns a long amount in bytes of the file.
e.g.
Dim lFileLength as long
lFileLength = FILELEN(c:\winnt\win.ini)
Martin.
#6
My code works because I used it a couple o days ago to import stuff from an excel sheet.....
sheetName = exApp.Workbooks(1).Worksheets(1).Name
the sheet number is in the Worksheets collection......you just have to iterate this collection and get the name of the sheet you want.....
if you want a sample application lemme know....
sheetName = exApp.Workbooks(1).Worksheets(1).Name
the sheet number is in the Worksheets collection......you just have to iterate this collection and get the name of the sheet you want.....
if you want a sample application lemme know....
Thread
Thread Starter
Forum
Replies
Last Post
Mattybr5@MB Developments
Full Cars Breaking For Spares
28
28 December 2015 11:07 PM
Mattybr5@MB Developments
Full Cars Breaking For Spares
12
18 November 2015 07:03 AM
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM