Leo_Polla_Psemata
Registered User.
- Local time
- Today, 12:24
- Joined
- Mar 24, 2014
- Messages
- 364
At first, i was in need to export from access a formatted excel report
and i reached my goal. The thread is here.
https://www.access-programmers.co.uk/forums/showthread.php?t=308329
In this address i found the code which i fixed to my needs.
http://accessjitsu.com/2015/09/13/c...g-data-from-microsoft-access-to-excel-part-2/
With this bit of code, i can change the name of excel sheet,
instead of "discount", i have used a field and every report sheet gets a meaningful name
xlApp.Visible = False
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets(1)
With xlSheet
.Name = "Discount"
.Cells.Font.Name = "Calibri"
.Cells.Font.Size = 11
Can we change the name of excel file?
Instead of "book1", could we use a field which will tell excel which file name to be saved?
and i reached my goal. The thread is here.
https://www.access-programmers.co.uk/forums/showthread.php?t=308329
In this address i found the code which i fixed to my needs.
http://accessjitsu.com/2015/09/13/c...g-data-from-microsoft-access-to-excel-part-2/
With this bit of code, i can change the name of excel sheet,
instead of "discount", i have used a field and every report sheet gets a meaningful name
xlApp.Visible = False
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets(1)
With xlSheet
.Name = "Discount"
.Cells.Font.Name = "Calibri"
.Cells.Font.Size = 11
Can we change the name of excel file?
Instead of "book1", could we use a field which will tell excel which file name to be saved?