Hi,
I have a project where I am copying data from one workbook to another using VBA.
The syntax has data copying from one workbook, opening another workbook, pasting, then save, and close.
The thing is that the other workbook is visible when it opens, and saves then closes. I want it to be doing this in the background. I tried a couple of syntax, but it hides the workbook completely, and to open it you need to manually unhide it.
For an overview, the user enters information in the calculator, presses a button which copies the info, opens an email, copies it to the body, then opens another workbook, and copies in a table under the last line.
this is what i have to open an close:
Sub OpenWorkbook()
Workbooks.Open "F:\Department Folders\Accounting\GMD Calculator Journal\GMD_Calculator_Journal.xlsx"
End Sub
**the code that Im using to copy paste from one sheet to another goes here***
Sub CloseWorkbook()
Workbooks("GMD_Calculator_Journal.xlsx").Close SaveChanges:=True
End Sub
I have a project where I am copying data from one workbook to another using VBA.
The syntax has data copying from one workbook, opening another workbook, pasting, then save, and close.
The thing is that the other workbook is visible when it opens, and saves then closes. I want it to be doing this in the background. I tried a couple of syntax, but it hides the workbook completely, and to open it you need to manually unhide it.
For an overview, the user enters information in the calculator, presses a button which copies the info, opens an email, copies it to the body, then opens another workbook, and copies in a table under the last line.
this is what i have to open an close:
Sub OpenWorkbook()
Workbooks.Open "F:\Department Folders\Accounting\GMD Calculator Journal\GMD_Calculator_Journal.xlsx"
End Sub
**the code that Im using to copy paste from one sheet to another goes here***
Sub CloseWorkbook()
Workbooks("GMD_Calculator_Journal.xlsx").Close SaveChanges:=True
End Sub