Mart van Hulten
New Member
- Joined
- Oct 9, 2018
- Messages
- 11
<code>
Sheets(studentBlad).Select
ActiveSheet.Cells(3, kolom).Select
ActiveCell.FormulaR1C1 = "='" + naamSp + "'!RC[1]"
ActiveSheet.Cells(3, kolom).Select
Range(Cells(3, kolom), Cells(10, kolom)).FillDown
</code>
The above does what it's supposed to do when I use this in a macro, but as part of seperate vba-code, it doesnt do anything. Don't understand why.
studentBlad is a string, containing the name of a worksheet. So is naamSp
kolom is an integer (value = 77)
I am trying to copy a formula from 'naamSp'! to studentBlad
Sheets(studentBlad).Select
ActiveSheet.Cells(3, kolom).Select
ActiveCell.FormulaR1C1 = "='" + naamSp + "'!RC[1]"
ActiveSheet.Cells(3, kolom).Select
Range(Cells(3, kolom), Cells(10, kolom)).FillDown
</code>
The above does what it's supposed to do when I use this in a macro, but as part of seperate vba-code, it doesnt do anything. Don't understand why.
studentBlad is a string, containing the name of a worksheet. So is naamSp
kolom is an integer (value = 77)
I am trying to copy a formula from 'naamSp'! to studentBlad