Quick Immediate Window Commands useful for debugging
1. When you have a form open and you encounter an error and you want to go to the excel sheet
You need to hide the form first before you can click on the sheet
Me.Hide
2. If you want to activate a sheet other than the current activesheet its better to use sheet code name than the names which are displayed in sheet tabs
Sheet3.Activate
3. To display/hide sheet tabs
ActiveWindow.DisplayWorkbookTabs = True
4. If you are working on more than one workbooks, then to activate a particular workbook
Workbooks("WorkbookNameInString").Activate
5. Close a workbook with/without saving
Workbooks("WorkbookNameInString").Close False 'To close without saving>
6. To display the value of a variable
?variable name
7. To display the address of range variable
? Range("RangeName").Address
8. To show hidden columns
Columns("D:H").Hidden = False
....will keep adding more to this list
- Vishesh's blog
- Login or register to post comments
- 18894 reads
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago