ManUBlueJay
Active Member
- Joined
- Aug 30, 2012
- Messages
- 304
- Office Version
- 2016
- Platform
- Windows
I have a named Range called "MyRange" that is not associated to a cell but is a calculation counting how many rows are used.
I would like to have a message box at the end of my code to tell me how many records were effected.
I did the following but it returns a Run Time Error 1004 on "LineCount = Range("MyRange").Value" line
I would like to have a message box at the end of my code to tell me how many records were effected.
I did the following but it returns a Run Time Error 1004 on "LineCount = Range("MyRange").Value" line
VBA Code:
Sub MyMacro()
Dim LineCount As String
LineCount = Range("MyRange").Value
Range("Import_DataBaseRange") = Range("Import_UpdateRange").Value
MsgBox ((LineCount) & " Records Have Been Added")
ActiveWorkbook.Save
End Sub