Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In the below code, I am receiving a Run-time error ‘1004’:
Application-defined or object-defined error. The line If Empty(.Range…. is highlighted yellow. Could someone suggest a fix? Thanks, Phil Private Function CheckRange(Cell As Range) Dim sMsg As String With Worksheets("Scorecard") If IsEmpty(.Range(Cell)) Or .Range(Cell).Value <= 0 Then If .Range(Cell).MergeArea.Address(False, False) < Cell Then sMsg = "Weight for Cell(s) " & _ ..Range(Cell).MergeArea.Address & _ " must be entered, and must be greater than zero." Else sMsg = "Weight for cell " & _ ..Range(Cell).Address & _ " is required" End If CheckRange = sMsg & sMsg & vbCrLf End If End With End Function --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error code 1004 | Excel Worksheet Functions | |||
Error Code 1004 when exporting from VB app to Excel 2007 | Excel Discussion (Misc queries) | |||
Run Time Error '1004' | Excel Worksheet Functions | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
VBA code to save gives error 1004??? | Excel Programming |