Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the following code the ActiveCell is always empty.
If the computer reads the WorkBook, where is the data in memory? Option Explicit Sub TestIntl() Dim wkst As Worksheet Dim wslb As Worksheet Dim lastRow As Long lastRow = Range("L" & Rows.Count).End(xlUp).Row Range("L1").Select Set wkst = ActiveSheet Do Until ActiveCell.Row lastRow MsgBox ActiveCell.Value ' Always Empty ActiveCell.Offset(1, 0).Activate ' Move to Next Row Loop lastRow = Range("L" & Rows.Count).End(xlUp).Row Range("L1").Select Set wslb = ActiveSheet Do Until ActiveCell.Row lastRow MsgBox ActiveCell.Value ' Always Empty ActiveCell.Offset(1, 0).Activate ' Move to Next Row Loop End Sub In the example above if I did not have a: Set wkst = ActiveSheet or Set wslb = ActiveSheet This routine works. When I add the two lines above the ActiveCell is empty. I am trying to understand how Excel works and things like this confuse me. In VB6 if I create a skelaton file and activate it, there is data in it. Is this the same concept in Excel? Thanks For the Help! John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Labels- POssible to show data value and data label together? | Charts and Charting in Excel | |||
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India | Excel Worksheet Functions | |||
Save 20% On Data Conversion and Data Formats Services by Data EntryIndia | Excel Discussion (Misc queries) | |||
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing | Excel Discussion (Misc queries) | |||
MULTIPLE DATA - How to insert new data into existing data.... | Excel Discussion (Misc queries) |