Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Macro error

I created a set of workbooks that use a common addin. The addin shows the
userform and processes it. I put the workbooks in a folder on a file server
and digitally signed each workbook and the addin.

The first time users put their information in the workbooks and the file is
reopened this message occurs:

"The macros in this file do not match the digital signature. Only a macro
virus would cause this. Please scan for viruses, and notify the publisher of
this document. Macros will be disabled."

When scanned by McAfee no viruses appear.

If I open another one of the workbooks and save my changes this doesn't
occur.

Here is the code in sheet1 of each workbook:

Sub lblNew_Click()
show_userForm
End Sub

Here is the code in module1 of the addin:

Sub show_userForm()
UserForm1.Show
End Sub

Here is the code in userForm1 of the addin:

Sub cmdCancel_Click()
Unload UserForm1
End Sub

Sub cmdOK_Click()
' Validate the Project Name
If txtProject.Text = "" Then
MsgBox "You must enter a Project Name!"
txtProject.SetFocus
Exit Sub
End If

' Validate the Business Unit
If TxtUnit.Text = "" Then
MsgBox "You must enter a Business Unit!"
TxtUnit.SetFocus
Exit Sub
End If

' Validate the Sponser
If TxtSponsor.Text = "" Then
MsgBox "You must enter a Sponser Name!"
TxtSponsor.SetFocus
Exit Sub
End If

' Validate the CWA
If TxtCWA.Text = "" Then
MsgBox "You must enter a CWA!"
TxtCWA.SetFocus
Exit Sub
End If

' Validate the Salco
If TxtSalco.Text = "" Then
MsgBox "You must enter a Salco!"
TxtSalco.SetFocus
Exit Sub
End If

'Validate the category of work 0r optTraining or optAdmin
If Not optProject And Not optTraining And Not optAdmin Then
MsgBox "You must select a category!"
optProject.SetFocus
Exit Sub
End If

' get the top row in the insert area
Rows("4:4").Select
Selection.Insert Shift:=xlDown
Range("A4").Select

' Transfer the information
With ActiveCell
.Offset(0, 0) = txtProject.Text
.Offset(0, 1) = Now()
.Offset(0, 2) = TxtUnit.Text
.Offset(0, 3) = TxtSponsor.Text
.Offset(0, 4) = TxtPool.Text
.Offset(0, 5) = TxtCWA.Text
.Offset(0, 6) = TxtSalco.Text
End With

' Transfer the category of work
If optProject Then ActiveCell.Offset(0, 7) = "Project Management"
If optTraining Then ActiveCell.Offset(0, 7) = "Training"
If optAdmin Then ActiveCell.Offset(0, 7) = "Administration"

' Close form
Unload UserForm1
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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Macro 'Automation error' with ChemOffice Excel macro Stew Excel Programming 0 October 27th 03 08:26 PM
Macro Security Error No Macro Val Steed Excel Programming 1 September 10th 03 06:58 PM


All times are GMT +1. The time now is 10:44 PM.

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"