VBA 424 Code error

Florida1510

New Member
Joined
Mar 13, 2020
Messages
35
Office Version
  1. 2010
Platform
  1. Windows
Hi folks,

I'm hoping someone could assist me. I'm trying to figure out why I keep getting a 424 error on this line of code. I have spent several hours trying to troubleshoot it on my own with no luck. I'm hoping someone here might be able to assist me. I have attached a screenshot of my screen. Thank you in advance this group is awesome👍

Line of code with 424 error
Set nextrec = Sheet3.Range("A1048576").End(xlUp).Offset(1, 0)

Full set of code:
Sub RecordofInvoice()

Dim invno As Long
Dim custname As String
Dim amt As Currency
Dim dt_issue As Date
Dim term As Byte
Dim nextrec As Range


invno = Range("C3")
custname = Range("B10")
amt = Range("I36")
dt_issue = Range("C5")
term = Range("C6")

Set nextrec = Sheet3.Range("A1048576").End(xlUp).Offset(1, 0)

nextrec.Value = invno
nextrec.Offset(0, 1) = custname
nextrec.Offset(0, 2) = amt
nextrec.Offset(0, 3) = dt_issue
nextrec.Offset(0, 4) = dt_issue + term


End Sub


Thanks Owen
 

Attachments

  • 424 Error.png
    424 Error.png
    49.5 KB · Views: 42
Thank you to Joe4 and Davesexcel yes the issue was that I was trying to run the macro that was stored in my personal workbook and on the worksheet itself. Thank you both so much for your help and support you don't know how much your guys help keeps us folks new to writing VBA going. Simple things like this make me want to through my computer through the window sometimes. I TRULY appreciate the assistance and support!!!!!!!

Owen
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You are welcome. Glad we were able to help!

Note when you mark a post as the solution, please mark the original post containing the solution, and not your own posting acknowledging that some other post is the solution.
I have update this for you.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top