ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simply silly question (https://www.excelbanter.com/excel-programming/273482-simply-silly-question.html)

Paul

Simply silly question
 
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul


John Wilson

Simply silly question
 
paul,

Activecell.Row

should do the trick.

John

paul wrote:

Embarassingly, I don't know how the get the current row
number in VB :-(

Paul



MacroMan

Simply silly question
 
ActiveCell.Row

should do it...

hth

-----Original Message-----
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul

.


John Gittins

Simply silly question
 
Also works if you set the variable up as a Integer, which you can use to do
counts and such with.

"Ed" wrote in message
...
Paul:

I have "Dim rngR As String" and use "rngR = ActiveCell.Row" to collect the
row number and use it later ("Range("AB" & rngR).Select").

HTH
Ed

"paul" wrote in message
...
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul






Ed[_9_]

Simply silly question
 
Thank you, John! I know I'll need that in the future as I get more involved
in this.

Ed


"John Gittins" wrote in message
...
Also works if you set the variable up as a Integer, which you can use to

do
counts and such with.

"Ed" wrote in message
...
Paul:

I have "Dim rngR As String" and use "rngR = ActiveCell.Row" to collect

the
row number and use it later ("Range("AB" & rngR).Select").

HTH
Ed

"paul" wrote in message
...
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul








John Gittins

Simply silly question
 
Just a point but the return from "ActiveCell.Row" is an Integer

"Ed" wrote in message
...
Paul:

I have "Dim rngR As String" and use "rngR = ActiveCell.Row" to collect the
row number and use it later ("Range("AB" & rngR).Select").

HTH
Ed

"paul" wrote in message
...
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul






DH[_2_]

Simply silly question
 
Well. no it isn't an integer when the row number exceeds 32 thousand
something---I think it is about 32760 or so.
Set it to single if you exceed the 32k limit

Dave

"John Gittins" wrote in message
...
Just a point but the return from "ActiveCell.Row" is an Integer

"Ed" wrote in message
...
Paul:

I have "Dim rngR As String" and use "rngR = ActiveCell.Row" to collect

the
row number and use it later ("Range("AB" & rngR).Select").

HTH
Ed

"paul" wrote in message
...
Embarassingly, I don't know how the get the current row
number in VB :-(

Paul








Alan Beban[_3_]

Simply silly question
 
Said slightly differently, the Integer variable type and the Long
variable type each refer to integers; the range of the Integer type is
-32768 to 32767; the range of the Long type is -2,147,483,648 to
2,147,483,647. Single and Double variable types can include both
integers and non-integers.

Row numbers are always integers; but if the row number is larger than
32,767, it can't be assigned to an Integer type variable, but can be
assigned to a Long Type variable.

Alan Beban

John Wilson wrote:
DH,

When passing row numbers to variables, the recommended way is
to dim them as Long so that you're not constrained by the
32,767 limit with Integer.

John

DH wrote:


Well. no it isn't an integer when the row number exceeds 32 thousand
something---I think it is about 32760 or so.
Set it to single if you exceed the 32k limit

Dave

"John Gittins" wrote in message
...

Just a point but the return from "ActiveCell.Row" is an Integer

"Ed" wrote in message
...

Paul:

I have "Dim rngR As String" and use "rngR = ActiveCell.Row" to collect

the

row number and use it later ("Range("AB" & rngR).Select").

HTH
Ed

"paul" wrote in message
. ..

Embarassingly, I don't know how the get the current row
number in VB :-(

Paul








All times are GMT +1. The time now is 04:43 PM.

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