seeking VBA ideas to convert a workbook to another workbook

unigee

New Member
Joined
Jan 24, 2011
Messages
24
Hi forum,

I have developed a VBA script that will check all the selected cells and extract certain information from those cells.
This works fine and have no issues regarding that part.

Now I have a "Master" workbook, which needs to contain the information from a "Client" workbook.

The basic process flow of what I need done is outlined below
  • Receive email from client with an attached excel file
  • Open Master excel file
  • Open client file
  • Highlight data I need parsing - on client file
  • Switch to the Master file
  • Click an "import" button on the Master file that runs by VBA code

Then my VBA code would extract all the data from the selection, and add it to my Master file.

The problem is that I am using
Code:
Set selected = Application.Selection

Which means, when I switch over to the master file, my VBA code uses the active selection on the Master file instead of the selection on the Client file.
To make things worse, I do not know the filename of the client file due to it being different each day - hence the reason why I was going the Application.Selection route.

Does anyone have any ideas how I can get around this?

As I was typing this up I thought of copying the data to the clipboard, and using that data instead of a selection - That might be a solution if I can work with the clipboard in VBA.

Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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