Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem migrating Excel 2000 File to Excel and Outlook 2003

Status
Not open for further replies.

Fiat77

Programmer
Feb 4, 2005
63
0
0
US
We have the below code that runs on the button click. In excel 2000 the code runs fine and opens the Outlook Application to a new email and inserts the defined subject into the subject line and the send to information. We have a user that is using Excel 2003 and the code is breaking at the line in between the asterisks. The problem being, that Outlook is not opening so therefore the rest of the code can not be completed. We've checked the Macro security in Outlook 2003 and it is set to Medium. The error message we are getting is as follow:

Error Message:

General Mail Failure: Quit Microsoft Excel, restart the Mail system and try again.

We have tried existing out of Excel and Outlook and restarting but we continue to get the same error message.

Can someone help us out. We've never see this error message before.
Thanks,

Private Sub CommandButton1_Click()

Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to E-Mail this document to FF Audit?" ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
Title = "Warning" ' Define title.
Help = "DEMO.HLP" ' Define Help file.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
'On Error GoTo err_showSendDialog
If Response = vbYes Then
' User chose Yes.
Dim ws As Worksheet, myrange As Range, c As Range, myStr As String
Dim X(), i As Long
Set ws = ThisWorkbook.Sheets("Level 2 Support Manager")
Set myrange = Range("B37,B38,B39,B40")
X = Array(" FP Usage Reviewed---", " FP Usage Approved---", " Completed By Level 2 Support Manager---", " Contract Governance Recipient---")
For Each c In myrange

If c = "" Then myStr = myStr & X(i)
i = i + 1
Next
If Len(myStr) > 0 Then
MsgBox "You missed " & vbNewLine & myStr, vbCritical
Else
If Sheets("Level 2 Support Team Member").Range("b34").Value > #1/1/2001# Then
Sheets("Level 2 Support Manager").Unprotect
Sheets("Level 2 Support Manager").Range("b22").Value = Now()
Sheets("Level 2 Support Manager").Protect

************************************************************
Application.Dialogs(xlDialogSendMail).Show "FFAudit@gaic.com",

*********************************************
ActiveSheet.Range("d9").Value
ActiveSheet.Protect DrawingObjects:=False, Contents:=False, Scenarios:=False

Sheets("CaptureProfile").Visible = True
Application.Run ("Copy_Profile")
Sheets("CaptureProfile").Visible = False
Sheets("Level 2 Support Manager").Select
Me.CommandButton3.Enabled = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

End If
End If
Else ' User chose No.
DoCmd.CancelEvent

exit_showSendDialog:
Exit Sub


'Application.Dialogs(xlDialogSendMail).Show "FFAudit@gaic.com", ActiveSheet.Range("d9").Value
End If
End Sub
Programmers Area - Microsoft: Access Reports Forum
Fiat77 (Programmer)2 replies7/6/05 (posted 7/5)
Determine the date for the Friday of a given Year and week Number
If on my report I have the Year in field Txt_Year and I have the Week Number in field Txt_Week, what function can i use to determine the datae for Friday.

Example Txt_Year returns 2005
Txt_Week returns 20
I need a text box named Txt_Date to return 5/13/2005 which is the corresponding Friday for those Year and week Number Parameters. How can i do this? Thank
Programmers Area - Microsoft: Access Forms Forum
Fiat77 (Programmer)3 replies7/1/05 (posted 7/1)
Enable a Cascade update of tables Based on Windows ID in After Update
I have a text box on my main form for a Claim Number. This field is the basis of seral 1 To Many Relationships in Tables in the database. What I need is in the After Update event for this Text Box, to enable a Cascade Update of all the Tables related to this claim number based on a specific Windows ID. I already have a module to capture the Windows User ID.

Example in AfterUpdate Event
If GetWindowsUser() = "jdoe" Then
allow for the cascade update of all related tables with that claim number
else do not allow cascade update

How can i do this? Thanks
Programmers Area - Microsoft: Access Modules (VBA Coding) Forum
Fiat77 (Programmer)1 replies6/21/05 (posted 6/21)
Fitered record display not correct
When I invoke a filter I have the following code on my OnCurrent event fo the Form. Problem is that after they do a filterBySelection it always displays
Filtered record 1 of 1 even though there are more than 1 total records. if they advance 1 record it correctly displays.

How can i correct this so that my text box instantly displays the correct filtered record count?

*************Code**********************

On Error GoTo ErrHandle_Err

If Me.NewRecord Then

Me!txtRecDisplay = "New Claim " & Me.CurrentRecord & " of " & Me.RecordsetClone.RecordCount + 1
ElseIf Me.FilterOn = True Then

Me!txtRecDisplay = " Filtered Claim " & Me.CurrentRecord & " of " & Me.RecordsetClone.RecordCount
Else
Me!txtRecDisplay = "Claim " & Me.CurrentRecord & " of " & Me.RecordsetClone.RecordCount
End If


ErrHandle_Exit:
Exit Sub

ErrHandle_Err:
MsgBox Error$
Resume ErrHandle_Exit
 
I had a similar problem. In the end we lowered macro security to low and this seemend to do the trick for us.
 
Thanks for the advice. We will try that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top