View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] aivars.avotins@gmail.com is offline
external usenet poster
 
Posts: 1
Default Running macros it returns compile error in hidden module

Hi,
I have several macros in personal.xls, what is shared with other people
on network drive. Till some time all worked well without problems, bet
then started problems for some computers (some working perfectly,
computers running Office XP and Office 2003, but problem is on both
verions ). Problem is when running macros it returns that "compile
error in hidden module".

Problem is only in macros what works with links:
1) breaks workbooks links to other workbooks
2) opens new outlook mail message and copy link to excel workbook
(workbook is saved on server)

Other macros is working ok (saving all as values)

Could some one help? Should I reinstall Office for those computers or
what else?

One macros what doesn't work:
Sub MailIt()
' creates and sends a new e-mail message with Outlook
Dim OLF As Outlook.MAPIFolder, olMailItem As Outlook.MailItem
Dim cels, nosaukums, cels1, nosaukums1 As String
cels1 = ActiveWorkbook.fullname
nosaukums1 = ActiveWorkbook.Name
cels = Replace(cels1, " ", "%20")
nosaukums = Replace(nosaukums1, " ", "%20")
Set OLF = GetObject("", _

"Outlook.Application").GetNamespace("MAPI").GetDef aultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add ' creates a new e-mail message
With olMailItem
.Subject = nosaukums ' message subject
.Body = "file:///" & cels & Chr(13)
' the message text with a line break
.OriginatorDeliveryReportRequested = False ' delivery
confirmation
.ReadReceiptRequested = False ' read confirmation
'.Save ' saves the message for later editing
'.Send ' sends the e-mail message (puts it in the Outbox)
End With
olMailItem.Display
Set olMailItem = Nothing
Set OLF = Nothing

End Sub