VBA: Can I move data from one workbook to another without opening the workbook?

Peter h

Active Member
Joined
Dec 8, 2015
Messages
417
I'm just curious if I can put data into a different workbook without actually opening the workbook. I use Environ("Username") to create a list on a hidden sheet to monitor who accesses my projects. I use this method for multiple projects. Well I was thinking that maybe I'll start separate workbook to store this data (eg. "Users.xlsm"). So I was thinking about if, for example, a user opens "DataEntry.xlsm", the username, file name, and date stamp will be recorded in the "Users.xlsm" file. I know how to do this by having the code open the file, record the data, and then save and close the file, but I was wondering if it was possible to do all of that without ever actually opening the "Users" file. If the file does have to be opened, can it be done using something like .Visible = False, so that the users can't see this happening? Thanks for any help or suggestions on the matter.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
The MSDos file system allowed files to be appended to others without having to open the target.
I see that VBA may be probably do similar with text files. If they are delimited then you could draw that data into your workbook at a later time, but I cannot image that you do as you desire without having a workbook already open.
My thoughts only.
 
Upvote 0
Last edited:
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top