macrolearning
New Member
- Joined
- Oct 13, 2014
- Messages
- 1
Hi everybody,
First of all, thank you all for your previous collaboration. I am currently engaging more with Excel [2010] and VBA, and with the stumbles along the way, your answers to other people's questions have been great answers to my questions as well. Usually with the Record Macro feature and all of your advice, I manage to learn some new VBA and get some nice projects done. I wouldn't have created this account if it wasn't because I could not find this topic discussed anywhere:
I am working with a lot of worksheets that have a heavy amount of formulas, and the intention is to create a macro that finds a workbook, and copies and pastes a range into another.
Reading the file location URL as an input in a cell is my greatest struggle. Is this possible with VBA? Or does the explicit name of the workbook have to be placed into VBA each time and not into a cell?
TLDR; VBA copy and paste from a new workbook mentioned in a cell from range defined on cells.
Here is an example image in case this explains my problem better:
[TABLE="width: 632"]
<tbody>[TR]
[TD="colspan: 4"]Template[/TD]
[TD][/TD]
[TD="colspan: 4"]Example[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]File Location[/TD]
[TD][/TD]
[TD="colspan: 4"]File Location[/TD]
[/TR]
[TR]
[TD="colspan: 4"][URL OF FILE WOULD GO HERE][/TD]
[TD][/TD]
[TD="colspan: 4"]C:\Users\Public\Pictures\Sample Pictures[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]Range Desired[/TD]
[TD][/TD]
[TD="colspan: 4"]Range Desired[/TD]
[/TR]
[TR]
[TD]From Column[/TD]
[TD]From Row[/TD]
[TD]To Column[/TD]
[TD]To Row[/TD]
[TD][/TD]
[TD]From Column[/TD]
[TD]From Row[/TD]
[TD]To Column[/TD]
[TD]To Row[/TD]
[/TR]
[TR]
[TD="colspan: 4"][Identifying numbers/letters go here][/TD]
[TD][/TD]
[TD]B[/TD]
[TD]5[/TD]
[TD]M[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks ahead of time, guys!
First of all, thank you all for your previous collaboration. I am currently engaging more with Excel [2010] and VBA, and with the stumbles along the way, your answers to other people's questions have been great answers to my questions as well. Usually with the Record Macro feature and all of your advice, I manage to learn some new VBA and get some nice projects done. I wouldn't have created this account if it wasn't because I could not find this topic discussed anywhere:
I am working with a lot of worksheets that have a heavy amount of formulas, and the intention is to create a macro that finds a workbook, and copies and pastes a range into another.
Reading the file location URL as an input in a cell is my greatest struggle. Is this possible with VBA? Or does the explicit name of the workbook have to be placed into VBA each time and not into a cell?
TLDR; VBA copy and paste from a new workbook mentioned in a cell from range defined on cells.
Here is an example image in case this explains my problem better:
[TABLE="width: 632"]
<tbody>[TR]
[TD="colspan: 4"]Template[/TD]
[TD][/TD]
[TD="colspan: 4"]Example[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]File Location[/TD]
[TD][/TD]
[TD="colspan: 4"]File Location[/TD]
[/TR]
[TR]
[TD="colspan: 4"][URL OF FILE WOULD GO HERE][/TD]
[TD][/TD]
[TD="colspan: 4"]C:\Users\Public\Pictures\Sample Pictures[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 4"]Range Desired[/TD]
[TD][/TD]
[TD="colspan: 4"]Range Desired[/TD]
[/TR]
[TR]
[TD]From Column[/TD]
[TD]From Row[/TD]
[TD]To Column[/TD]
[TD]To Row[/TD]
[TD][/TD]
[TD]From Column[/TD]
[TD]From Row[/TD]
[TD]To Column[/TD]
[TD]To Row[/TD]
[/TR]
[TR]
[TD="colspan: 4"][Identifying numbers/letters go here][/TD]
[TD][/TD]
[TD]B[/TD]
[TD]5[/TD]
[TD]M[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thanks ahead of time, guys!