ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Offset with variable? (https://www.excelbanter.com/excel-programming/365995-offset-variable.html)

John

Offset with variable?
 
I get an error on this simple line of code...

st1 = st1.Offset(1, 0)

st1 is a range... is there anyother way to make st1 step one cell down?

Die_Another_Day

Offset with variable?
 
st1 is an object and therefore must be set...
Set st1 = st1.Offset(1,0)

HTH

Die_Another_Day
John wrote:
I get an error on this simple line of code...

st1 = st1.Offset(1, 0)

st1 is a range... is there anyother way to make st1 step one cell down?




All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com