LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Library missing

Hi all,

I have the following problem.

I have a button executing VBA code (below) to print an array of worksheets.
This code has been working flawlessly, and has not been changed in any way.
However, after emailing the file to a user on another pc, the problem below
pops up.

Can anyone help?

Hi- am having a technical problem with this one- it won't print out. When I
hit the 'print invoice' button, a message pops up saying "compile error-
can't find project or library", and then visual basic pops up. I've pasted
in the script below. There should be an arrow pointing to the line " Private
Sub btnPrintInv_Click()

Private Sub btnPrintInv_Click()

'This procedure executes when the user clicks the Print Invoice button and
print 'previews all the invoice areas from Inv Summ to result 10.


frmWait.Show o

frmWait.Repaint

With Sheets(Array("Inv Summ", "Result 1", "Result 2", "Result 3", "Result
4", "Result 5", _

"Result 6", "Result 7", "Result 8", "Result 9", "Result

10"))

SetPrintAreasInv

frmWait.Hide

..PrintPreview

End With

Worksheets("Help").Activate

Worksheets("Inv Summ").Activate

Range("A1").Select

end sub

Sub SetPrintAreasInv()
'This procedure confirms that the print settings for each sheet are correct.

Application.ScreenUpdating = False
For Each Sheet In Sheets
If Sheet.Name = "Help" Or Sheet.Name = "Billing Rates" Or _
Sheet.Name = "Analysis" Or Sheet.Name = "Expense Schedule" Then
'Do nothing
Else
With Sheet.PageSetup
If .TopMargin < Application.InchesToPoints(0.5) Then
.TopMargin = Application.InchesToPoints(0.5)
End If
.CenterHeader = ""
.BlackAndWhite = True
.PrintArea = "$A$1:$I$70"
If .CenterHeader < "" Then .CenterHeader = ""
If .LeftFooter < "&8Printed: &T on &D" Then .LeftFooter =
"&8Printed: &T on &D"
If .RightFooter < "&8&F" Then .RightFooter = "&8&F"
If .LeftMargin < Application.CentimetersToPoints(2.1) Then
.LeftMargin = Application.CentimetersToPoints(2.1)
End If
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End If
Next
Application.ScreenUpdating = True

End Sub



 
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
Missing library??? pcor New Users to Excel 0 November 26th 06 04:25 PM
Missing Library Jan Il Excel Worksheet Functions 2 March 19th 05 04:56 PM
Reference Library - Missing Library in a lower version. luvgreen Excel Programming 1 October 7th 04 02:08 AM
Missing library? Ko Vijn Excel Programming 4 February 5th 04 11:23 PM
Library missing.. Warrio[_2_] Excel Programming 2 October 27th 03 06:28 PM


All times are GMT +1. The time now is 08:30 AM.

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

About Us

"It's about Microsoft Excel"