The issue is I have 3 sub procedures to click to get 3 different files with the right click button. I use the file names to run the report but I cannot figure out how to run the 3 Sub procedures back to back as the 3 files are selected. I tried a macro to ruin them to no avail. Here are the 3 Subs and if anyone could tell me how to run all 3, I would appreciate it...
Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N10" Then
myfilepathN10 = Application.GetOpenFilename()
If myfilepathN10 = False Then
Target = ""
Else
Target = myfilepathN10
End If
Cancel = True
End If
End Sub
Sub Worksheet_BeforeRightClick1(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N12" Then
myfilepathN12 = Application.GetOpenFilename()
If myfilepathN12 = False Then
Target = ""
Else
Target = myfilepathN12
End If
Cancel = True
End If
End Sub
Sub Worksheet_BeforeRightClick2(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N14" Then
myfilepathN14 = Application.GetOpenFilename()
If myfilepathN14 = False Then
Target = ""
Else
Target = myfilepathN14
End If
Cancel = True
End Sub
Thanks,
Ray
Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N10" Then
myfilepathN10 = Application.GetOpenFilename()
If myfilepathN10 = False Then
Target = ""
Else
Target = myfilepathN10
End If
Cancel = True
End If
End Sub
Sub Worksheet_BeforeRightClick1(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N12" Then
myfilepathN12 = Application.GetOpenFilename()
If myfilepathN12 = False Then
Target = ""
Else
Target = myfilepathN12
End If
Cancel = True
End If
End Sub
Sub Worksheet_BeforeRightClick2(ByVal Target As Range, Cancel As Boolean)
If Target.Address(0, 0) = "N14" Then
myfilepathN14 = Application.GetOpenFilename()
If myfilepathN14 = False Then
Target = ""
Else
Target = myfilepathN14
End If
Cancel = True
End Sub
Thanks,
Ray