Can someone please help me with a problem regarding podcast 1505?

Status
Not open for further replies.

DonnyK

New Member
Joined
Mar 8, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello all,
I am not an avid use of excel. I am a small business owner (Painting Contractor) and have been trying to make an invoice that works for me. I truly need one that expands as needed but couldn't find any code to do that. I like the new invoice Save and clear in the podcast 1505. It works well with a single page on a sheet however I had to create multiple pages on one worksheet and am now trying to make the podcast 1505 work with it. I'm sure there is a better way to do what I made. I just want to be able to clear the invoice areas save to my file and the register. Below is what I did to do that but there is something wrong for sure, only the file is being saved. Can anyone help me please?

Sub PostToRegster() - This is not working
Dim WS1 As Worksheet
Dim WS2 As Worksheet
Set WS1 = Worksheet("Long Invoice")
Set WS2 = Worksheet("Register")

'Figure out which row
NextRow = WS2.Cells(Row.Count, 1).End(xlUp).Row + 1

'Write the important valuse to Register
WS2.Cells(NextRow, 1).Resize(1, 5).Value = Array(WS1.Range("B6"), WS1.Range("B8"), _
WS1.Range("G1"), WS1.Range("K6"), WS1.Range("H9"))
End Sub

Sub NextInvoice() - This area is in yellow
Range("G1").Value = Range("G1").Value + 1
Range ("A15:J45"), Range("A67:J99"), Range("A120:J152"), Range("A173:J205"), Range("A226:J258"), Range("A279:J311"), Range("A332:J364").ClearContents
End Sub
Sub SaveInvoiceWithNewName() - This is the only thing working right now
Dim NewFN As Variant
'Copy Invoce to a New Workbook
ActiveSheet.Copy
NewFN = "C:\2022 Invoices\Inv" & Range("G1").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Duplicate to: Help with Podcast 1505

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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