lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I understand I can replace worksheets(1) with thisworkbook in the code below. I checked both Workbook and Thisworkbook and I found they are not identical 100%. So how can I replace one with another if they are not identical. Is it technically ok to replace one with another or I should put in my mind I will lose/gain something when I do so? Same apply to Worksheets(1) vs activesheet. Thank you very much.
Sub myfirst()
ThisWorkbook.ActiveSheet.Cells(2, 2).Font.Bold = True
End Sub
Sub myfirst()
workbooks(1).ActiveSheet.Cells(2, 2).Font.Bold = True
End Sub
I understand I can replace worksheets(1) with thisworkbook in the code below. I checked both Workbook and Thisworkbook and I found they are not identical 100%. So how can I replace one with another if they are not identical. Is it technically ok to replace one with another or I should put in my mind I will lose/gain something when I do so? Same apply to Worksheets(1) vs activesheet. Thank you very much.
Sub myfirst()
ThisWorkbook.ActiveSheet.Cells(2, 2).Font.Bold = True
End Sub
Sub myfirst()
workbooks(1).ActiveSheet.Cells(2, 2).Font.Bold = True
End Sub