Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49892

Newb Help. Copy Worksheet from one file and another, with a twist

$
0
0
I have data in Workbook A and I need to copy one of the worksheets to the end of Workbook B. I need a macro in Workbook A that will:


Prompt the user for the file location for Workbook B.

Copy Worksheet1 from Workbook A to the newly opened Workbook B.

Find and Replace a text string (the embedded reference from Workbook A) and replace all with a blank.
** For clarification, when Workbook A is Copied to Workbook B it retains the original Workbook A name in the formulas. So I need to get rid of that reference and have the forumlas reference Workbook B. So I do a Find "WorkbookA.xlsx" and replace all with "".****

After the find and replace is complete, a dialog box will automatically pop and indicate the number of cells changed.

The caveat is sometimes the Workbook B is not shareable so the "Review/Share Workbook/"Allow Changes by more than one user" box has to be unchecked.

Thank you in advance!!

auballard

Viewing all articles
Browse latest Browse all 49892

Trending Articles