Hello,
I am fairly new to VBA and cannot find anything online that will fix my issue. In a quick description of my process. I have dropdowns lists throughout my template master that feed the values to Row 2 of sheet "Summary". I then have a button that I want click to send that entire row values to a closed workbook.
My current Code (found on youtube) is below minus my saving location. The problem I am running into is when the row pastes into the closed sheet it pastes the formula and not the value. I have tried entering .PasteSPecial and didn't have any luck. I don't know if i am entering it incorrect maybe? Any help would be appreciated! Or if you have another idea that may work better. I will be using DropBox if that makes a difference. Thanks for the help!
I am fairly new to VBA and cannot find anything online that will fix my issue. In a quick description of my process. I have dropdowns lists throughout my template master that feed the values to Row 2 of sheet "Summary". I then have a button that I want click to send that entire row values to a closed workbook.
My current Code (found on youtube) is below minus my saving location. The problem I am running into is when the row pastes into the closed sheet it pastes the formula and not the value. I have tried entering .PasteSPecial and didn't have any luck. I don't know if i am entering it incorrect maybe? Any help would be appreciated! Or if you have another idea that may work better. I will be using DropBox if that makes a difference. Thanks for the help!
VBA Code:
Private Sub CommandButton1_Click()
Dim WB As Workbook
ThisWorkbook.Worksheets("Summary").Rows(2).Select
Selection.Copy
Set WB = Workbooks.Open("C:\SAVINGLOCATIONy.xlsx")
WB.Worksheets("Tank Query").Activate
LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
ActiveSheet.Cells(LastRow + 1, 1).Select
Worksheets("Tank Query").Paste
ActiveWorkbook.Save
ActiveWorkbook.Close savechanges = Ture
Set WB = Nothing
ThisWorkbook.Worksheets("summary").Activate
ThisWorkbook.Worksheets("Summary").Cells(1, 1).Select
Application.CutCopyMode = False
End Sub
Last edited by a moderator: