Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dont want a button

Hiya all.
So far I have this

Private Sub SubmitSwipe_Click()

If Sheets("Introduction").Range("F13").Value = "" Then
DoErrorMsg("NoSwipe")
Else

Submitted = Sheets("Introduction").Range("F13").Value

DoSwipeCheck (Submitted)

End If
End Sub


But what I would like to do is instead of having a button to press that
does the above I would like it so once the cell F13 has had its value
entered it automatically executes the above code.
The reason for this is the value of F13 is done by a swipe card. Which
once its value is entered the swipe also creates either a newline or
"enter" on its own ... which I thought could be used instead of having
to press a button, if you know what i mean.


thx


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-0, 14/01/2008
Tested on: 14/01/2008 07:49:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Dont want a button

If I understand your code correctly (and if you haven't hidden too much from
us), you should be able to do what you want like this...

1) Right-click the tab for your Introduction sheet.

2) Select View Code from the popup menu that appears.

3) Copy/Paste the following code into the code window that appeared when you
did Step #2

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$13" Then
If Target.Value = "" Then
DoErrorMsg "NoSwipe"
Else
DoSwipeCheck Range("F13").Value
End If
End If
End Sub

4) Make sure the scopes of both DoErrorMsg and DoSwipeCheck are such that
they can be "seen" from the worksheet's code window (that means either put
them in the same code window as you pasted the above code in, or put them in
a Module and make sure they are declared as Public).

That should be it... give it a try and see if it works for you.

Rick


"Steve" wrote in message
...
Hiya all.
So far I have this

Private Sub SubmitSwipe_Click()

If Sheets("Introduction").Range("F13").Value = "" Then
DoErrorMsg("NoSwipe")
Else

Submitted = Sheets("Introduction").Range("F13").Value

DoSwipeCheck (Submitted)

End If
End Sub


But what I would like to do is instead of having a button to press that
does the above I would like it so once the cell F13 has had its value
entered it automatically executes the above code.
The reason for this is the value of F13 is done by a swipe card. Which
once its value is entered the swipe also creates either a newline or
"enter" on its own ... which I thought could be used instead of having
to press a button, if you know what i mean.


thx


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-0, 14/01/2008
Tested on: 14/01/2008 07:49:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dont want a button

"Rick Rothstein \(MVP - VB\)" wrote
in :

If I understand your code correctly (and if you haven't hidden too
much from us), you should be able to do what you want like this...

1) Right-click the tab for your Introduction sheet.

2) Select View Code from the popup menu that appears.

3) Copy/Paste the following code into the code window that appeared
when you did Step #2

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$13" Then
If Target.Value = "" Then
DoErrorMsg "NoSwipe"
Else
DoSwipeCheck Range("F13").Value
End If
End If
End Sub

4) Make sure the scopes of both DoErrorMsg and DoSwipeCheck are such
that they can be "seen" from the worksheet's code window (that means
either put them in the same code window as you pasted the above code
in, or put them in a Module and make sure they are declared as
Public).

That should be it... give it a try and see if it works for you.

Rick


"Steve" wrote in message
...
Hiya all.
So far I have this

Private Sub SubmitSwipe_Click()

If Sheets("Introduction").Range("F13").Value = "" Then
DoErrorMsg("NoSwipe")
Else

Submitted = Sheets("Introduction").Range("F13").Value

DoSwipeCheck (Submitted)

End If
End Sub


But what I would like to do is instead of having a button to press
that does the above I would like it so once the cell F13 has had its
value entered it automatically executes the above code.
The reason for this is the value of F13 is done by a swipe card.
Which once its value is entered the swipe also creates either a
newline or "enter" on its own ... which I thought could be used
instead of having to press a button, if you know what i mean.


thx


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-0, 14/01/2008
Tested on: 14/01/2008 07:49:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com






---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 13:54:13
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com





Works like a dream mate!!

Thanks


---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080114-1, 14/01/2008
Tested on: 14/01/2008 13:58:27
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com



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
Dont want #DIV/0!. Wanna Learn Excel Worksheet Functions 3 January 3rd 08 03:14 PM
Dont know if this is possible to do Jahcureus Excel Discussion (Misc queries) 0 February 3rd 06 11:47 AM
button awareness. i dont know if it can be done. cdde[_2_] Excel Programming 3 October 22nd 04 05:07 AM
button awareness. i dont know if it can be done. cdde[_3_] Excel Programming 0 October 22nd 04 12:34 AM
Dont know how? Krefty[_3_] Excel Programming 1 December 15th 03 10:43 AM


All times are GMT +1. The time now is 11:12 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"