VBA intellisense data

glfiedler

Board Regular
Joined
Apr 1, 2019
Messages
67
Office Version
  1. 365
Platform
  1. Windows
I dimensioned a variable as Dim rowS without thinking. I have been coding for decades so I know using "rowS" as a variable is, of course, a bad idea even thought the vba editor is smart enough to take context into account and keeps running smoothly. As soon as I realized my mistake I deleted the Dim rowS and replaced it with Dim rowStart. I then, of course, corrected the code to match the new variable name.
Every thing runs fine except for "intellisense". Now when I want to use the Excel word "Rows" intellisense lists "Rows" but as soon as I select it using the tab key it enters "rowS" into the code.
I know, so what. It just looks sloppy and I am not a sloppy programmer, generally.
Is there a way to clear previously dimensioned variables from the editor's memory?
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Declare the same variable as Rows,

Code:
Dim Rows as Range

Then let VBE to autocomplete by typing Sheet1.Rows.Count for example, and clear the declaration.

It should be cleared.
 
Upvote 0
Thank you! That solved the problem. In fact the editor automatically fixed all the entries of "rowS" too.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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