Hi,
I have this problem every time I try to code anything more complicated
than few lines.
It occurs for example in following code. Im sure the code is right as I
use exactly same code on my second computer. This must be something in
excel options or I have no clue ????
Dim PathWinZip As String, FileNameZip As String, FileNameXls As
String
Dim ShellStr As String, strDate As String
Dim OutApp As Object
Dim OutMail As Object
PathWinZip = "C:\program files\7-zip\"
'This will check if this is the path where WinZip is installed.
If Dir(PathWinZip & "7z.exe") = "" Then
MsgBox "Please find your copy of winzip32.exe and try again"
Exit Sub
End If
' Build the date/Time string
strDate = Format(Now, "dd-mm-yy h-mm-ss")
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
<<<<<------------------------------error here
With OutMail
Bookmarks