• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

copy content from a workbook to anothers in automatical way

mlaxx

New Member
hy. i have a workbook - daybook.xls, and what i want to do: when the data is added in sheet1, i want a vba code to make a copy of the contet from sheet1 in two differet workbooks. but when i add new data in the daybook, the new data to be copied in continuation of previously entered data in this separated workbooks.
 

Attachments

  • DayBook.xlsm
    12.9 KB · Views: 1
mlaxx
You're writing about daybook.xls and two different workbook ---
You've uploaded DayBook.xlsm ...
None of those match with You writings...
Do You want that every time You would have three same kind of workbooks or what?
Means also ... if somehow make mistake, then there would be three mistakes ... none correct version?
 
I uploaded all the files needed to understand what I want to get.
I repeat when data is entered in the dailybook workbook, I want to automatically copy in two other workbooks- cloneone.xls and clonetwo.xls.

It is not a problem if the wrong data is entered in the dailybook. I'm interested in automatically copying content. the two worksbook will be on different computers.
 

Attachments

  • cloneone.xlsx
    8.5 KB · Views: 2
  • clonetwo.xlsx
    8.4 KB · Views: 1
  • DailyBook.xlsx
    8.6 KB · Views: 1
mlaxx
Files ... three files ... but ... maybe You haven't focus the best way.
Could You use eg OneDrive or iCloud Drive, instead of ... copying?
To copy to different computers could work only if .. if .. if ... many things could be 100% correct.
So far, You have not given enough information.
Try to figure, how to do that manually?
 
Unfortunately, I can not use OneDrive or iCloud. Repeat, maybe logically or at productivity level, is not an elegant solution, but this is the "solution" at the moment. I still can not find the VBA code to help me. So?
 
mlaxx
As written: Try to figure, how to do that manually?

Start Macro Recorder
do it manually
Stop Macro Recorder

Save file and Upload it here.
 
I think it's oconfusion. I'm a beginner in VBA. If I knew how to write VBA code for this situation I was doing it, so I came to this forum, where there are many specialists to find a solution. If there is.
 
mlaxx
How to copy something to other computers some path without knowing exact path?
(( add: exact path from computer1 to computer2's file as well as to computer3's file ))
That's why I tried to ask to do that recording.
That's why I tried to ask, if You could do it manually?
 
Last edited:
Vletm I'm sure for you is a trivial thing, being a good specialist. But let's limit the solution to the situation described. We do not take into account the real scenario with the files hosted on different computers. We assume to find the code, that the three files are in a single folder. When I enter data into the dailybook file I want to automatically copy the content into two other files - cloneone and clonetwo. I know it is redundant, counterproductive, but let us focus on the demand. automatic copying from one file to another two. Is it possible to do this?
if yes .. how? I do not have enough knowledge to create a VBA code.
That's why I opened the topic.
 
mlaxx
It's is possible ...
but it needs eg exact path from one computer to other computer.
Same case is with any copy data from even from cell to cell ... or ...
If You should phone to me ... You should know my number. Without that, it's a challenge.
Ooooh ... and now, I noticed ... windy!
Something same, it's possible to do code for that version - but then users should be very patient.
Gotta try to check that soon...
 
Thank you. I assume you were right from the beginning, the experience says its word.
In fact, I have the following scenario: dailybook.xlsb will be in a folder on a server. In the same folder will be cloneone.xlsm and clonetwo.xlsm. The path to the folder would be "Z: Production \".
I assume that if the dailybook file was opened by a user, and the cloneone would be opened by another user on another computer, and the clonetwo file would be opened by another user on another computer, the code would not work. What solution would it be for this scenario?
 
mlaxx
Hmm? Hmm?
Now, Yours 'I assume...' has more details which You haven't written before!
Before previous ... there were 'I' .. 'I' .. 'I' !
There would be challenges, if there are more than one user!
My version works for one user - it opens (if not open those other files) for 'update' those and after that closes other files!
It's one sample version ... something, what have You asked ...
= If You ask 'this' and You write 'that' then You will get 'this' not 'that' - okay?
Your newer scenario would work someway if ... if ... if and if do some modifications.
But, still there would be challenges, eg if other users edit same time file or has modified...
You can try to modify that code ... hide line which closes other file.
Hint: You should think think think before ask something ... many times even minor modifications would mess everything!
 
Vletm not everybody has your experience. I'm a beginner in vba coding. If my attitude or responses offended you, I apologize. I'm just trying to find a solution to something that has to happen to me, to work. Perhaps I have not found the most successful expression of my ideas.
 
Back
Top