Delta Star
Board Regular
- Joined
- Oct 28, 2009
- Messages
- 184
I've setup a macro but need to amend it but cannot get it to work. I'm trying to incorporate the Pickfolder Function but am struggling with this line
This is what I'm currently using and am trying to get rid of the hardcode of the file location.
Code:
"=IF(COUNTIF(Summary!R10C2:R89C2,R2C)>0,'C:\Documents and Settings\Desktop\Current Models\[Monday.xls]Template'!R[-1]C,0)"
This is what I'm currently using and am trying to get rid of the hardcode of the file location.
Code:
UserFile = PickFolder(strStartDir)
If UserFile = "" Then
Exit Sub
End If
'
If Sheets("Summary").Range("A10") = True Then
Sheets("Sheet4").Select
Range("C3").Select
ActiveCell.FormulaR1C1 = _
"=IF(COUNTIF(Summary!R10C2:R89C2,R2C)>0,'C:\Documents and Settings\Desktop\Current Models\[Monday.xls]Template'!R[-1]C,0)"
Selection.Copy
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If