runtime error 6 overflow help

Brass Contributor

I was reading up on why I was getting this error and I have no clue how to fix it. I have "Dim row As Integer" and then later in that sub I have "row=row+1" (as shown in the picture.)

 

I'm not really sure why this is happening now because this error had never shown up before.

 

Screenshot 2023-04-02 100556.png

2 Replies

@LilYawney 

You can change this:

Dim row As Integer

 

to this:

Dim row As Long

 

Datatype Long is for values in the range from -2.147.483.648 to 2.147.483.647.

I'm pretty sure it worked but there's another error in that sub so once it works I'll let you know!