Hello,
The following code is to find the first row - last row and the first column - last column. It ran fine in EXCEL2000
but received error message in EXCEL 97.
The error message is :
"Run-time error '1004'
Unable to ge the CurrentReigon property of the Range class"
Could you help me to fix the problem?
Here is the code:
Private Sub cmd_Update_Click()
Dim ExpRang As Range
Set ExpRang = ActiveCell.CurrentRegion 'Error msg
here -- unable to get currentreigon
property of the RANGE class
FirstCol = ExpRang.Columns(1).Column
LastCol = FirstCol + ExpRang.Columns.Count - 1
FirstRow = ExpRang.Rows(1).Row
LastRow = FirstRow + ExpRang.Rows.Count - 1
Range("A1:A1"
.Select
.............................
The following code is to find the first row - last row and the first column - last column. It ran fine in EXCEL2000
but received error message in EXCEL 97.
The error message is :
"Run-time error '1004'
Unable to ge the CurrentReigon property of the Range class"
Could you help me to fix the problem?
Here is the code:
Private Sub cmd_Update_Click()
Dim ExpRang As Range
Set ExpRang = ActiveCell.CurrentRegion 'Error msg
here -- unable to get currentreigon
property of the RANGE class
FirstCol = ExpRang.Columns(1).Column
LastCol = FirstCol + ExpRang.Columns.Count - 1
FirstRow = ExpRang.Rows(1).Row
LastRow = FirstRow + ExpRang.Rows.Count - 1
Range("A1:A1"
.............................