Accessing Worksheets in Excel

  • Thread starter Thread starter muskkate
  • Start date Start date
M

muskkate

Hello,

How can I get Worksheet Object from Workbook object, and then how can I
identify Autodates in Excel sheet
Please help me out as early as possible

thanking you,
 
Dim wB As Workbook, wS As Worksheet

Set wB = ActiveWorkbook
Set wS = wB.Sheets("Sheet1")

'or

Set wS = wB.Sheets(1)

'or

Set wS = wB.ActiveSheet

'or if codename for a sheet has been set to mySheet

Set wS = mySheet

' or scan worksheets collection to find sheet

For Each wS In wB.Worksheets
If wS.Name = "Sheet1" Then Exit For
Next

AutoFill options can be set in the Tools > Options; I am not sure what you
are trying to do in terms of AutoDates?
 
Hi,
Thank you for the reply It is useful to me, actually I want to identify Auto
dates fields in Worksheets. I am not able to access the cell object through
Workbook object, my exact query is that how can I identify that the excel
sheet has got auto dates in it or not and if they are there how can i access
it and modify it programmatically.
Because in word document if there is auto date then it can be identified as
WdFieldDate or WdFieldTime of enumeration WdFieldType.
will you please help me?
Thank you in advance

regards
muskkate
 
Back
Top