ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Set statement (https://www.excelbanter.com/excel-discussion-misc-queries/205218-set-statement.html)

aftamath77

Set statement
 
Dim intHXRCount As Integer
Set intHXRCount = Worksheets("Sheet8").Range("G4").Value

I get an error that says "Object Required"


aftamath77

Set statement
 


"aftamath77" wrote:

Dim intHXRCount As Integer
Set intHXRCount = Worksheets("Sheet8").Range("G4").Value

I get an error that says "Object Required"


TomPl

Set statement
 
Skip the "Set". Code should read:

Dim intHXRCount As Integer
intHXRCount = Worksheets("Sheet8").Range("G4").Value

Tom

"aftamath77" wrote:

Dim intHXRCount As Integer
Set intHXRCount = Worksheets("Sheet8").Range("G4").Value

I get an error that says "Object Required"



All times are GMT +1. The time now is 05:21 AM.

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