dss28
Board Regular
- Joined
- Sep 3, 2020
- Messages
- 165
- Office Version
- 2007
- Platform
- Windows
I want to add code to some columns in a sheet to define the number format or date format using the following codes
should I be using the worksheet.change event or worksheet.calculate event? or just worksheet.activate event?
please guide
VBA Code:
ThisWorkbook.Sheets("Report").Range("E2:E" & Cells(Rows.Count, 1).End(xlUp).row).NumberFormat = "mm-dd-yyyy" ' date format
ThisWorkbook.Sheets("Report").Range("J2:J" & Cells(Rows.Count, 1).End(xlUp).row).NumberFormat = "0.00" ' two digit number format
should I be using the worksheet.change event or worksheet.calculate event? or just worksheet.activate event?
please guide