473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

From Access Export Excel to Desktop

I have a database that has been split. The tables are in a network shared folder and the front end forms & queries are in a file saved in a SharePoint Folder. Everyone is able to save and update the data in the db but I am not able to get any of the excel files to save to each person desktop. Was using a button that ran a macro using the "RunSaveImportExport" command (C:\Users\environ("username")\Desktop\Proj_in_Red_ Export.xlsx"). Thank for all for your help. David
Feb 26 '18 #1
1 3229
twinnyfo
3,653 Expert Mod 2GB
AirDavidADP,

First, I would recommend doing what you are doing in VBA, as it will allow you to use variables more easily.

What you are looking for is to set up a variable in VBA to store the Username:

Expand|Select|Wrap|Line Numbers
  1. strUserName = Environ("username")
Then the Export string becomes:

Expand|Select|Wrap|Line Numbers
  1. strExport = "C:\Users\" & strUserName & "\Desktop\Proj_in_Red_ Export.xlsx"
This is a basic outline and not the complete code, but htis should point you in the right direction.

Please let us know if you have any additional questions we can work through with this.
Feb 26 '18 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Rhona Gallogly | last post by:
After updating to XP our users are experiencing problems with the copy facility from access to excel. If you set the 'Number stores as text' off in excel then the numbers 'appear' on excel to be...
3
by: info | last post by:
After using clipboard functions in Excel controlled from Access VBA, Excel doesn't quit when I use the following ExcelApp.Quit Set ExcelApp = Nothing If I don't use the clipboard functions in...
3
by: excyauseme | last post by:
Hi guys! Do you know what is the best way to export a text file, this one is a log file that is already comma delimited thru a module run by my access database, to an excel spreadsheet? I need to...
4
by: torontolancer | last post by:
Hi there how r u .I would really appriciate ur concern regarding checking out this code. its beind a command button and i am have a combo box selecing a query criteria and then pressing the button...
1
by: accessvbanewbie | last post by:
I would like to export a recordset from access to excel but after each record is exported I want to insert a new row. The first recordset does this ok. However, the second recordset onwards does not...
0
by: Simon | last post by:
Dear reader, How to export a hyperlink field from Access to Excel, so it is also working in Excel. In Excel you have for the Hyperlink to parts: a.. Text To Display
6
by: and1 | last post by:
hello .. hmm currently i'm working on vba in excel, apparently i use ADO to extract a table data from access to excel and it works fine. the problem is when i use the extracted data to create a chart...
1
by: epifinygirl | last post by:
I am new to VBA writing so bear with me here. I have been searching the web but I keep finding answers in pieces which is more confusing! What I am trying to do is export a table from Access to...
15
by: Mihail | last post by:
Hello ! I read a lot about transfer data from Access to Excel. However I have not yet, in my brain, a clear stack. So, I ask you to help/assist me. Thank you ! All work must be done in Access...
0
by: DeboRoy | last post by:
Hello All, Please guide me VBA code to insert the image from access to excel file. Thanks
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.