SeniorNewbie
Board Regular
- Joined
- Jul 9, 2023
- Messages
- 77
- Office Version
- 2021
- 2019
- Platform
- Windows
- MacOS
Hi out there,
I'm fighting with an issue I guessed it's easy to solve. But it isn't. I hope somebody can help.
There are two workbooks. One as source, one as target. My code lays in the target grabbing some cells from the source. Therefor I'm using a xl4-function
The cell addresses for this function must be defined by A1 naming. The target addresses are not the same and I prefer for that the cells(row,col) naming. So I created two arrays aSource ("A1", "B1") and aTarget("Cells(5,1)", "Cells(7,12)")
The transfer of the data from one workbook to the other works. But the import is just lined up in row(1) of the target and I don't know how to force the data to the correct address. A sample of several attemps:
wb = ThisWorkbook
THX in advance for any idea
Senior Newbie
I'm fighting with an issue I guessed it's easy to solve. But it isn't. I hope somebody can help.
There are two workbooks. One as source, one as target. My code lays in the target grabbing some cells from the source. Therefor I'm using a xl4-function
VBA Code:
GetValue(sPath, sFile, sSheet, sAdr)
The transfer of the data from one workbook to the other works. But the import is just lined up in row(1) of the target and I don't know how to force the data to the correct address. A sample of several attemps:
VBA Code:
sTarget = (aTarget(i))
Set rng = wb.ActiveSheet.sTarget
rng = GetValue(sPath, sFile, sSheet, sAdr)
THX in advance for any idea
Senior Newbie