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
- 19016 reads
Recent comments
6 years 2 weeks ago
6 years 40 weeks ago
7 years 2 days ago
7 years 3 weeks ago
7 years 4 weeks ago
7 years 9 weeks ago
7 years 17 weeks ago
7 years 18 weeks ago
7 years 18 weeks ago
7 years 18 weeks ago