Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello, I am using the following subroutine (Copy Last Row in J Column)
to copy the last cell in J column to the one below at the bottom of my worksheet. When I disable the Private Sub Worksheet_Change(ByVal Target As Range), by placing single quotation marks against the code, then the subroutine (Copy Last Row in J Column) works well. When I enable the Private Sub Worksheet_Change(ByVal Target As Range), by removing the single quotation marks against the code, then the subroutine (Copy Last Row in J Column) does not work at all. Could someone please help as I still want to use Upper Case upon cell entry for my worksheet. Any help would be greatly appreciated. Kind regards, Chris. Sub Copy_Last_Row_In_J_Column() ' Copy Last Row in J Column Application.ScreenUpdating = False With Sheets("Register") .Cells(.Rows.Count, "J").End(xlUp).Copy _ Destination:=.Cells(.Rows.Count, "J") _ .End(xlUp).Offset(1, 0) End With End Sub Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub End If On Error GoTo ErrHandler: If Not Application.Intersect(Me.Range("A1:U50000"), Target) Is Nothing Then If IsNumeric(Target.Value) = False Then Application.EnableEvents = False 'Target.Value = StrConv(Target.Text, vbLowerCase) Target.Value = StrConv(Target.Text, vbUpperCase) 'Target.Value = StrConv(Target.Text, vbProperCase) Application.EnableEvents = True End If End If ErrHandler: Application.EnableEvents = True End Sub *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change cell range to Uppercase | Excel Programming | |||
How do change entire worksheet to uppercase letters and lock it | Excel Worksheet Functions | |||
How do I change uppercase to proper case in entire worksheet? | Excel Worksheet Functions | |||
CHANGE WHOLE EXCEL worksheet TO UPPERCASE LETTERS? | Excel Discussion (Misc queries) | |||
Change the font case of all cells in the worksheet to uppercase? | Excel Worksheet Functions |