ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range selection in a sheet module (https://www.excelbanter.com/excel-programming/285805-range-selection-sheet-module.html)

raj

Range selection in a sheet module
 
Hello, please help me if you can.

I am trying to make a simple range selection from inside a
worksheet module, for example:

Range(strRange).End(xlToLeft).Select

or even something as simple as:

ActiveSheet.Range("A5").Select

And I get "Select method of range class failed." error.
How can I correct this?

Your example code to fix mine would be greatly
appreciated. Thanks in advance.

raj

Range selection in a sheet module
 
I'm sorry - please disregard this post. I discovered an
error in my code.

-----Original Message-----
Hello, please help me if you can.

I am trying to make a simple range selection from inside

a
worksheet module, for example:

Range(strRange).End(xlToLeft).Select

or even something as simple as:

ActiveSheet.Range("A5").Select

And I get "Select method of range class failed." error.
How can I correct this?

Your example code to fix mine would be greatly
appreciated. Thanks in advance.
.


Don Guillett[_4_]

Range selection in a sheet module
 
I just did both of these without a problem
Sub selcel()
'ActiveSheet.Range("A5").Select
strRange = "$IV$1"
Range(strRange).End(xlToLeft).Select
End Sub

Try leaving xl and coming back or re-boot

--
Don Guillett
SalesAid Software

"raj" wrote in message
...
Hello, please help me if you can.

I am trying to make a simple range selection from inside a
worksheet module, for example:

Range(strRange).End(xlToLeft).Select

or even something as simple as:

ActiveSheet.Range("A5").Select

And I get "Select method of range class failed." error.
How can I correct this?

Your example code to fix mine would be greatly
appreciated. Thanks in advance.





All times are GMT +1. The time now is 12:03 AM.

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