Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Assistance

Status
Not open for further replies.

Rebellion34

Technical User
May 7, 2008
30
US
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. 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top