Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21901

Two Different report saved in one Excel report

$
0
0
Hello Folk, I'm generating two different excel report, Report 1 save to Sheet1 and Report2 saved to Sheet2, I'm actually looking forward to save those report in on Excel worksheet. What I'm facing now when generate report1 it save to [Sheet1] and generate Report2 and saved to [Sheet2] I did found only Sheet2 Data and Sheet1 blank. Is it possible when generate report1 and save it under name [ReceivedAsia] then generate report2 and save it under same name without delete report1 [Sheet1] Data?. I'm using save as as code below. Thank you very much

Code:

'Report1 procedure code
xlwk.Worksheets("Sheet1").SaveAs "E:Reports\ReceivedAsia" & vernum & Format(Date, "~mm-dd-yyyy") & ".xls"

Code:

'Report2 procedure code
xlwk.Worksheets("Sheet2").SaveAs "E:Reports\ReceivedAsia" & vernum & Format(Date, "~mm-dd-yyyy") & ".xls"

Edited: To combine those report1 [Sheet1] and report2 [Sheet2] i did use COPY and PASTE after generating report1, 2. Very annoying right.

Viewing all articles
Browse latest Browse all 21901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>