Compile Error "Invalid Outside Procedure"

K

Kanmi

Please can anybody help me check this code. When i run it show Compile
Error"Invalid outside procedure" then i removed the "BuildDetailReport" and
re-run and again it show Compile Error " Wrong number of argument or invalide
proprty assignment" then automatic highlight "Call BuildDetailReport". please
advice. Thanks


BuildDetailReport
Private Sub CommandButton1_Click()
ask = MsgBox("Build safety report?", vbYesNo, BoxTitle)
If ask = 7 Then Exit Sub



Select Case Range("D21")
Case "DOWNSTRM":
Set TrainingSht = Sheets("Training_Progress_By_Employee")
Set PersonnelSht = Sheets("Personnel Roster")
Set PersonnelSht = Sheets("Lookup")

Case "OFC":
Set TrainingSht = Sheets("Training_Progress_By_Employee2")
Set PersonnelSht = Sheets("Personnel Roster2")
Set PersonnelSht = Sheets("Lookup2")

End Select



Call BuildDetailReport(TrainingSht, PersonnelSht)
MsgBox "Done", , BoxTitle
End Sub
 
M

Mike H

Hi,

Stop jumping around creating new threads and see my comments in your
previous post. It's the top line here that's giving the compile error, delete
it

BuildDetailReport
Private Sub CommandButton1_Click()

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top