A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

signature line



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2008, 04:38 PM posted to microsoft.public.excel.worksheet.functions
pdaws
external usenet poster
 
Posts: 18
Default signature line

I have created a form in Excel 2002 that requires three different signatures.
I would like for each signature's username to appear in the specific cell
that they should sign when they review the form. Is there any way to create
such a code?
  #2  
Old September 23rd, 2008, 07:40 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default signature line

Private Sub Workbook_Open()
Dim uname As String
Sheets("Sheet1").Select
uname = Environ("UserName")
Select Case uname
Case Is = "Gord"
Range("A1").Value = uname
Case Is = "Ralph"
Range("A2").Value = uname
Case Is = "Agnes"
Range("A3").Value = uname
End Select
End Sub


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 08:38:26 -0700, pdaws
wrote:

I have created a form in Excel 2002 that requires three different signatures.
I would like for each signature's username to appear in the specific cell
that they should sign when they review the form. Is there any way to create
such a code?


  #3  
Old September 23rd, 2008, 08:03 PM posted to microsoft.public.excel.worksheet.functions
pdaws
external usenet poster
 
Posts: 18
Default signature line

Gord, I am receiving an error message when I copied the code into a VBA module.

"Gord Dibben" wrote:

Private Sub Workbook_Open()
Dim uname As String
Sheets("Sheet1").Select
uname = Environ("UserName")
Select Case uname
Case Is = "Gord"
Range("A1").Value = uname
Case Is = "Ralph"
Range("A2").Value = uname
Case Is = "Agnes"
Range("A3").Value = uname
End Select
End Sub


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 08:38:26 -0700, pdaws
wrote:

I have created a form in Excel 2002 that requires three different signatures.
I would like for each signature's username to appear in the specific cell
that they should sign when they review the form. Is there any way to create
such a code?



  #4  
Old September 23rd, 2008, 09:52 PM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default signature line

It has to be copied into Thisworkbook module.

Right-click the Excel Icon left of "File" on the worksheet menu bar.

Select "View Code".

Paste into that module.

But................having it in a regular module should not produce an
error, just not run.

What is the error message and number?


Gord


On Tue, 23 Sep 2008 12:03:01 -0700, pdaws
wrote:

Gord, I am receiving an error message when I copied the code into a VBA module.

"Gord Dibben" wrote:

Private Sub Workbook_Open()
Dim uname As String
Sheets("Sheet1").Select
uname = Environ("UserName")
Select Case uname
Case Is = "Gord"
Range("A1").Value = uname
Case Is = "Ralph"
Range("A2").Value = uname
Case Is = "Agnes"
Range("A3").Value = uname
End Select
End Sub


Gord Dibben MS Excel MVP


On Tue, 23 Sep 2008 08:38:26 -0700, pdaws
wrote:

I have created a form in Excel 2002 that requires three different signatures.
I would like for each signature's username to appear in the specific cell
that they should sign when they review the form. Is there any way to create
such a code?




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.