Hello, so I am what you would call a rookie at VBA-programming, nonetheless, I need to learn it! Currently I am trying to figure out a way to get certain cells from one excel sheet into another. I am using the code posted below:
Sub GetValue()
p = "xxx"
F = "xxxx.xlsx"
s = "xxxx"
Application.ScreenUpdating = False
For r = 1 To 100
For c = 1 To 10
a = Cells(r, c).Address
Cells(r, c) = GetValue(p, F, s, a)
Next c
Next r
Application.ScreenUpdating = True
End Sub
But this is generating very odd values. It only imports the cell-value in B2 and copies that value to cells A1, A2, B1 and B2. All other cells have #VALUE! error. I cannot understand this, hopefully you can help me!
Best regards
Pelle
Bookmarks