Rebellion34
Technical User
Hi all,
I am new to VB scrpiting and I am trying to set up a worksheet that will auto Caps certain Columbs and auto date Columb D. I have been succseful in doing this seperately fron eachother but have a name conflict when trying to have both run on the same spreadsheet. I also need to auto date to change only in new cells and not update the previously saved ones, the macro Codes are listed below.also will this code allow the previously endered data in an earlier saved doc to remain constand and not update tio the new date when opened the following day? I welcome any assistance on this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1,B1,C1:A100,B100,C100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
With Target(1, 4)
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub
Thanks
Reb
I am new to VB scrpiting and I am trying to set up a worksheet that will auto Caps certain Columbs and auto date Columb D. I have been succseful in doing this seperately fron eachother but have a name conflict when trying to have both run on the same spreadsheet. I also need to auto date to change only in new cells and not update the previously saved ones, the macro Codes are listed below.also will this code allow the previously endered data in an earlier saved doc to remain constand and not update tio the new date when opened the following day? I welcome any assistance on this.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1,B1,C1:A100,B100,C100")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A100")) Is Nothing Then
With Target(1, 4)
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub
Thanks
Reb