donatepresent
New Member
- Joined
- Oct 4, 2017
- Messages
- 21
Hi Experts,
I'm trying to paste the below code, but I want it to not popup the 'open file dialog box' because I have another line of code that copy & paste this code and that pop up the open file dialog box, so I do not want it to popup twice. Therefore, I need it to either ignore the first or second popup of the open file dialog box.
Full code:
Thanks,
Ken
I'm trying to paste the below code, but I want it to not popup the 'open file dialog box' because I have another line of code that copy & paste this code and that pop up the open file dialog box, so I do not want it to popup twice. Therefore, I need it to either ignore the first or second popup of the open file dialog box.
VBA Code:
ActiveCell.FormulaR1C1 = _
"=IFERROR(HLOOKUP(R[-38]C,'[FileToOpen = Application.GetOpenFilename]Programs'!R6C4:R41C55,36,FALSE),"""")"
Full code:
VBA Code:
With ActiveWorkbook.Sheets("Sheet2")
Range("D44").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(HLOOKUP(R[-38]C,'[FileToOpen = Application.GetOpenFilename]Programs'!R6C4:R41C55,36,FALSE),"""")"
End With
Range("D44").Select
Selection.Copy
Range("D43").Select
Selection.End(xlToRight).Select
ActiveCell.Offset(1, 0).Activate
Range(Selection, Selection.End(xlToLeft)).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Style = "Comma"
Thanks,
Ken