ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA question (https://www.excelbanter.com/excel-programming/372567-vba-question.html)

kirkm[_6_]

VBA question
 
Hello - the syntax

(Target, Range("C1:C3"))

Can 'C3' be expressed as the upper row in the spreadsheet ?

Thanks - Kirk

Dave Peterson

VBA question
 
Wouldn't that upper row be 1?



kirkm wrote:

Hello - the syntax

(Target, Range("C1:C3"))

Can 'C3' be expressed as the upper row in the spreadsheet ?

Thanks - Kirk


--

Dave Peterson

kirkm[_6_]

VBA question
 
On Sun, 10 Sep 2006 12:34:43 -0500, Dave Peterson
wrote:

Wouldn't that upper row be 1?

I meant the last row in the ss, so the range would cover everything.

Dunno how this appeared here... meant to be a new thread!

Thanks - Kirk




kirkm wrote:

Hello - the syntax

(Target, Range("C1:C3"))

Can 'C3' be expressed as the upper row in the spreadsheet ?

Thanks - Kirk


Tom Ogilvy

VBA question
 
Range(Target,cells(rows.count,3).End(xlup))

perhaps.

for context:

Private Sub Worksheet_Change(ByVal Target As Range)
Set rng = Range(Target, Cells(Rows.Count, 3).End(xlUp))
MsgBox rng.Address
End Sub

--
Regards,
Tom Ogilvy

"kirkm" wrote in message
...
On Sun, 10 Sep 2006 12:34:43 -0500, Dave Peterson
wrote:

Wouldn't that upper row be 1?

I meant the last row in the ss, so the range would cover everything.

Dunno how this appeared here... meant to be a new thread!

Thanks - Kirk




kirkm wrote:

Hello - the syntax

(Target, Range("C1:C3"))

Can 'C3' be expressed as the upper row in the spreadsheet ?

Thanks - Kirk





All times are GMT +1. The time now is 08:00 AM.

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