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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
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,224,875
Messages
6,181,514
Members
453,050
Latest member
Obil

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