New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Error 13 - Type mismatch in my VBA coding

Macros, VBA, Excel Automation, etc.

Error 13 - Type mismatch in my VBA coding

Postby Sati » Wed Jun 15, 2016 9:43 pm

Hi There

I am new to coding and tried the following code to 'force Uppercase in drawing register'. It works fine until clear multiple range of cells.

Please help how to get rid of this error.

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Intersect(Target, Range("4:1000")) Is Nothing Then Exit Sub
If Intersect(Target, Range("D:AD")) Is Nothing Then Exit Sub

Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True

End Sub
  • 0

Sati
Rookie
 
Posts: 1
Joined: Jun 15, 2016
Reputation: 0
Excel Version: MS Excel 2010

Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 61 guests

cron