My Assistant
![]() ![]() |
|
|
Mar 2 2012, 05:59 AM
Post
#1
|
|
|
UtterAccess Member Posts: 23 |
Dear All
I Have a system running and I would like each user to export and import data via the import/export excel macro. Currently the code is C:\SUBMIT FOLDER\SUBMITFILE.xls I need to replace it with some code and a variable containg the user name. I have seen on the web like ="\\Network_Path\& even a date & "File name.xls" I could not get it to work. HELP please. Blessings. |
|
|
|
Mar 2 2012, 07:30 AM
Post
#2
|
|
|
UtterAccess Ruler Posts: 1,090 |
You must have a write right on the shared network path in order to save your file.
To get the current user, you can use the Environ("UserName") function. |
|
|
|
Mar 2 2012, 07:45 AM
Post
#3
|
|
|
UtterAccess Member Posts: 23 |
Thanks. Get the user is not the problem. It is to user it as a variable in the Macro to export a table as a excel file.
The Macro Action is:OutputTo The Output file is:C:\SUBMIT FOLDER\SUBMITFILE.xls I need to substitute the [SUBMIT FOLDER] with a internal variable containg the user and a folder name. My proble is can it be done in a macro? I do not get the systax right. Blessings. |
|
|
|
Mar 3 2012, 01:46 AM
Post
#4
|
|
|
UtterAccess Member Posts: 23 |
Yahooooo! Hallelujah!!!
I have solved my problem by using the VBA option in Access with the coding: DoCmd.TransferSpreadsheet ...... Blessings to all |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 25th May 2013 - 09:15 PM |