lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I have excel 2013. When I click on Developer-->VBA, excel will open VBA environment. Under project, I see 2 entries
1) Sheet1 (Sheet1)
2) ThisWorkbook
My understanding, if I want to write a code to run for ONLY sheet1 then I click on sheet1 and write the code. At same token, if I want to write a code that can run on any sheet then I click on ThisWorkbook and write the code. Am I right?
If yes then why I need to click on insert-->Module? How module is different from Sheet1 or ThisWorkbook entries?
Thank you.
I have excel 2013. When I click on Developer-->VBA, excel will open VBA environment. Under project, I see 2 entries
1) Sheet1 (Sheet1)
2) ThisWorkbook
My understanding, if I want to write a code to run for ONLY sheet1 then I click on sheet1 and write the code. At same token, if I want to write a code that can run on any sheet then I click on ThisWorkbook and write the code. Am I right?
If yes then why I need to click on insert-->Module? How module is different from Sheet1 or ThisWorkbook entries?
Thank you.