ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run Time Error 438 (https://www.excelbanter.com/excel-programming/406631-run-time-error-438-a.html)

mathew

Run Time Error 438
 
This is the top part of a macro. When it gets to the

Dim rrrRng As Range
Dim lowScore As Long
Dim playerName As String

Set rrrRng = Sheet1("A2:A6")

When it gets to this line: Set rrrRng = Sheet1("A2:A6")

I get "Run Time Error 438" Any help would be appreciated.

PCLIVE

Run Time Error 438
 
Try this:

Set rrrRng = Sheets("Sheet1").Range("A2:A6")

HTH,
Paul

--

"Mathew" wrote in message
...
This is the top part of a macro. When it gets to the

Dim rrrRng As Range
Dim lowScore As Long
Dim playerName As String

Set rrrRng = Sheet1("A2:A6")

When it gets to this line: Set rrrRng = Sheet1("A2:A6")

I get "Run Time Error 438" Any help would be appreciated.




mathew

Run Time Error 438
 
PClive: thanks that did the trick. Simple mistake!

"PCLIVE" wrote:

Try this:

Set rrrRng = Sheets("Sheet1").Range("A2:A6")

HTH,
Paul

--

"Mathew" wrote in message
...
This is the top part of a macro. When it gets to the

Dim rrrRng As Range
Dim lowScore As Long
Dim playerName As String

Set rrrRng = Sheet1("A2:A6")

When it gets to this line: Set rrrRng = Sheet1("A2:A6")

I get "Run Time Error 438" Any help would be appreciated.






All times are GMT +1. The time now is 07:32 AM.

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