Duplicate declaration in current scope

alex17353

New Member
Joined
Sep 15, 2014
Messages
5
I have this code but the problem is I don't understand what they mean by 'duplicate declaration in current scope and how to fix it
Code:
Sheets("tran1").Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Dim dentry As Long
Range("tran1!a2").Value = Range("sheet1!a11").Value
Range("Tran1!b2").Value = Now
Worksheets(2).Rows(x).Select
Dim x As Integer
x = 0
Do
x = x + 1
Loop Until Range("sheet1!a" & x).Value = Range("sheet1!a11").Value
Range("sheet1!c & x").Value = Range("sheet1!c & x").Value + TextBox2d.Value
Range("Tran1!D2") = TextBox2d.Value
Range("tran1!c2") = Range("sheet1! c & x").Value
 
Last edited by a moderator:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I have it in another userform sheet but the only thing similar on this user form is dim dentry as long in
 
Upvote 0
The message means that you have Dimmed the same variable more than once.
 
Upvote 0

Forum statistics

Threads
1,215,596
Messages
6,125,732
Members
449,255
Latest member
whatdoido

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top