Change signatures in report according to author

Bradon

Board Regular
Joined
Dec 18, 2002
Messages
66
I have two names that have signatures for a report and the signatures are .jpg images that are OLEunbound 119 and OLEunbound120.

The code I have used unsuccessfully is:

Private Sub author_AfterUpdate()
If Me.author = "Peter Hills" Then
Me.OLEUnbound119.Visible = True
Else
Me.OLEUnbound120.Visible = False
If Me.author = "John Pierce" Then
Me.OLEUnbound120.Visible = False
Else
Me.OLEUnbound119.Visible = True
End If
End If

End Sub


Wher have I gone wrong, or any suggestions of another method?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Bradon,
Have you thought about using the NT login ID as the value to assign the signiture with? Something along these lines.

Code:
Dim User as String

User = Environ("UserName")
Select Case User
Case "PHills"
   Me.Oleunbound119.visible =True
   Me.oleunbound120.visible = False
Case
   Me.oleunbound120.visible = True
   me.oleunbound119.visible = false
Case Else
    Me.oleunbound119.visible = True
    Me.oleunbound120.visible = False
End Select


HTH
Cal
 
Upvote 0
Hi Cal,

Thanks for the suggestion of using the NT login name. Unfortunately, the person using the report wouldn't automatically be the signature required.

The field [Author] will always contain the correct name.

I must admit I am totally lost on this one.

Gordon
 
Upvote 0

Forum statistics

Threads
1,221,847
Messages
6,162,380
Members
451,760
Latest member
samue Thon Ajaladin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top