sending data from one workbook to a closed workbook

Newport Count

Active Member
Joined
Oct 25, 2009
Messages
328
Hi,

currently I have an excel workbook (qwerty.xls) that has several worksheets. On one worksheet (workA) there is a macro button that opens up a userform. On the userform is a button (cmdSaveData) to send data (once complete) to a different worksheet (workB) in the same workbook (qwerty.xls).

My code is as follows:

Code:
Private Sub cmdSaveData_Click()
ActiveWorkbook.Sheets("workB").Activate
    Range("A2").Select
    Do
    If IsEmpty(ActiveCell) = False Then
        ActiveCell.Offset(1, 0).Select
    End If
    Loop Until IsEmpty(ActiveCell) = True

This works fine (i'm no expert on this at all but have worked out how to get this to work as i want to!) but now i need to enable my code to send the data to a completely different workbook (dvorak.xls).

Is this possible and can different people own their own versions of qwerty.xls (saved as diff names of course) to send to the same workbook (dvorak.xls) at the same time? maybe the workbook would have to be closed so that it could be opened and saved when available?

thanks in advance for any advice

cheers :)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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