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
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
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
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