Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input box for signing off work


Hi all,

This solution would probably work better with a user form but i'm
relatively new at VBA so am avoiding user forms right now....

I have a worksheet where users have to enter in produce delivered,
quantities etc. When items have been entered an "Archive" macro is run
to keep all the info.
What i need is something that when a user runs the macro, he/she is
promted to enter a password. This password is then copied to any cells
where say Range.(A) is a non null value.

E.g:

Date Product Signature

04/12/05 A

04/12/05 B

In this case when the macro is run, the user enters a password (from a
list sourced hidden elsewhere off the page), verifies the password is
valid and pastes either the password or username to the Signature
column. THen when everything is archived it can be determined who
checked those items.

Any help is much appreciated - as always and always!

Thanks in advance,

Chris


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=490702

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Input box for signing off work

Dim ans as String, res as Variant

ans = InputBox("enter password")
res = Application.Match(ans,worksheets("PasswordList").R ange("A1:A50"),0)
if not iserror(res) then
with worksheets("Produce").Range("B1:B100")
if .Value = "A" then
.offset(0,1).Value = ans
end if
end with
else
msgbox "No valid"
Cancel = True
End if

This would be in the BeforeSave Events

http://www.cpearson.com/excel/events.htm

for information on events if you are not familiar.

--
Regards,
Tom Ogilvy


"chris100" wrote in
message ...

Hi all,

This solution would probably work better with a user form but i'm
relatively new at VBA so am avoiding user forms right now....

I have a worksheet where users have to enter in produce delivered,
quantities etc. When items have been entered an "Archive" macro is run
to keep all the info.
What i need is something that when a user runs the macro, he/she is
promted to enter a password. This password is then copied to any cells
where say Range.(A) is a non null value.

E.g:

Date Product Signature

04/12/05 A

04/12/05 B

In this case when the macro is run, the user enters a password (from a
list sourced hidden elsewhere off the page), verifies the password is
valid and pastes either the password or username to the Signature
column. THen when everything is archived it can be determined who
checked those items.

Any help is much appreciated - as always and always!

Thanks in advance,

Chris


--
chris100
------------------------------------------------------------------------
chris100's Profile:

http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=490702



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input box for signing off work


Thanks Tom,

I'll give it a go and post here.

Chri

--
chris10
-----------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...fo&userid=2516
View this thread: http://www.excelforum.com/showthread.php?threadid=49070

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input box for signing off work


Hi Tom,

I set up the worksheets exactly as in the example using the correct
worksheet names. Unfortunately when i run the macro i get a "type
mismatch" error for this line:

If .Value = "A" Then


Any ideas?

Thanks,

Chris


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=490702

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Input box for signing off work


Anyone??

I don't want to sound impatient but i'm on a roll with this program and
just want to keep going.

Thanks for all the help from people like Tom Ogilvy and many others who
have shown me what you can actually do with excel (ok, enough sucking up
now).

Chris


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=490702



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 would like to sort a work sheet based upon user input value,(dat John Bundy Excel Worksheet Functions 0 November 30th 06 04:18 PM
I would like to sort a work sheet based upon user input value,(dat A1CaddMan Excel Worksheet Functions 0 November 29th 06 03:53 PM
Message Input with link to different work sheet KPM New Users to Excel 0 February 4th 06 05:20 PM
Message Input with link to different work sheet paul New Users to Excel 0 February 4th 06 02:59 PM
Input cell on Data Table will not work Sarah Bee Excel Discussion (Misc queries) 4 May 26th 05 12:51 AM


All times are GMT +1. The time now is 05:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"