Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default Compile Error "Invalid Outside Procedure"

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Compile Error "Invalid Outside Procedure"

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Creation Macro fails with Error #5 "Invalid procedure call or argument" [email protected] Excel Programming 1 July 10th 07 08:01 PM
what does "Compile Error : Invalid Qualifier" mean? funkymonkUK[_157_] Excel Programming 2 May 5th 06 09:48 AM
function "compile error msg: procedure too large" RASHESH Excel Programming 4 May 13th 05 04:48 AM
bizarre "invalid procedure call" error PatFinegan[_14_] Excel Programming 11 July 13th 04 07:56 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 10:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"