Lil Stinker
Board Regular
- Joined
- Feb 16, 2022
- Messages
- 151
- Office Version
- 2019
- Platform
- Windows
Howdy,
Currently I have this set up on two worksheets in the same workbook. One worksheet is used to create a quote. The other worksheet is the Quote Record. I would like to separate the two into different workbooks and have the Quote Record workbook automatically update as the quote is saved in the Quotes workbook.
It's not a big deal if both workbooks need to remain opened in order to update as long as the Quote Record workbook is closed after updating. Ideally, it would be better to have the Quote Record update without needing to open at all. The fewer windows open the better.
Below is the VBA I currently have to run the process of updating the Quote Record worksheet from the Quote worksheet. How do I manipulate this to achieve what I'm looking for?
Currently I have this set up on two worksheets in the same workbook. One worksheet is used to create a quote. The other worksheet is the Quote Record. I would like to separate the two into different workbooks and have the Quote Record workbook automatically update as the quote is saved in the Quotes workbook.
It's not a big deal if both workbooks need to remain opened in order to update as long as the Quote Record workbook is closed after updating. Ideally, it would be better to have the Quote Record update without needing to open at all. The fewer windows open the better.
Below is the VBA I currently have to run the process of updating the Quote Record worksheet from the Quote worksheet. How do I manipulate this to achieve what I'm looking for?
Sub QuoteRecord()
Dim qtno As String
Dim custname As String
Dim projname As String
Dim amt As Currency
Dim dt_issue As Date
Dim dt_due As Date
Dim nextrec As Range
qtno = Range("J1").Value & Range("K1").Value
custname = Range("B3")
projname = Range("B2")
amt = Range("K40")
dt_issue = Range("K4")
If IsEmpty(Range("E9").Value) = True Then 'If empty take value E27 else E9
dt_due = Range("E27")
Else
dt_due = Range("E9")
End If
Set nextrec = Sheet4.Range("A1048576").End(xlUp).Offset(1, 0)
nextrec = qtno
nextrec.Offset(0, 1) = custname
nextrec.Offset(0, 2) = projname
nextrec.Offset(0, 3) = amt
nextrec.Offset(0, 4) = dt_issue
nextrec.Offset(0, 5) = dt_due
End Sub