PC Review


Reply
Thread Tools Rate Thread

Compile Error "Invalid Outside Procedure"

 
 
Kanmi
Guest
Posts: n/a
 
      24th Jul 2009
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

 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      24th Jul 2009
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


"Kanmi" wrote:

> 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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time Error 5 "Invalid Procedure Call or Argument" Terri Microsoft Access Form Coding 1 3rd Feb 2010 08:57 PM
what does "Compile Error : Invalid Qualifier" mean? funkymonkUK Microsoft Excel Programming 2 5th May 2006 09:48 AM
"Invalid procedure call or argument" error loading VB6 project LAFJ Microsoft Access Form Coding 0 8th Mar 2006 12:29 AM
function "compile error msg: procedure too large" RASHESH Microsoft Excel Programming 4 13th May 2005 04:48 AM
Getting "Error 5 Invalid procedure call or argument" message =?Utf-8?B?anNjY29ycHM=?= Microsoft Access VBA Modules 4 21st Jan 2005 07:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:11 PM.