Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Code location

Want the module I have to be used only on the one worksheet. Where should
this module procedure be located. Presently it is in the list under modules
in the project.
It calls when return key is depressed. Looking it seems that it should be in
only the window opened when you ckeck the worksheet. Is this correct. Also
should the sub br called private? Or would it be private if within the sheet
code? I copy data from this sheet to others. that is when it activates on
other sheets.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Code location

I think I'd put something like this in the Worksheet_Change event for the
worksheet in question.

http://www.mvps.org/dmcritchie/excel/event.htm
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Curt" wrote:

Want the module I have to be used only on the one worksheet. Where should
this module procedure be located. Presently it is in the list under modules
in the project.
It calls when return key is depressed. Looking it seems that it should be in
only the window opened when you ckeck the worksheet. Is this correct. Also
should the sub br called private? Or would it be private if within the sheet
code? I copy data from this sheet to others. that is when it activates on
other sheets.
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Code location

If I understand you correctly I should have the code in place of where I now
call it in this code. Am not quite sure how it would trigger in this way.
Private Sub Worksheet_Change(ByVal Target As range)
Dim rng As range
Dim hastext As Long
On Error GoTo errhandler
Application.EnableEvents = False
If Target.Column = 12 And Target.Value <= 10 And
IsNumeric(Target.Value) Then _
Call CopyMailE(Target)
If Target.Column = 12 And Target.Value 10 And IsNumeric(Target.Value)
Then _
Call CopyDonors(Target)
If Target.Column = 12 And Target.Value 10 And IsNumeric(Target.Value)
Then _
Call CopyMailD(Target)
errhandler:
Application.OnKey "{RETURN}", "checkUp"---------------
Application.OnKey "{DOWN}", "checkUp"------------------
Application.EnableEvents = True
End Sub
Have this code for "checkup"
Sub checkUp()
' checkUp Macro watches data entry on data sheet
Dim chkRow As Integer
Dim cel As Object
chkRow = ActiveCell.row
If chkRow = 1 Then
ActiveCell.Offset(2, 0).Activate
Exit Sub
End If
For Each cel In range(Cells(chkRow, 3), Cells(chkRow, 11))
If Trim(cel) = "" Then
msgbox "If Row Complete Click OK Move with Mouse "
cel.Activate
Exit Sub
End If
Next cel
ActiveCell.Offset(1, 0).Activate
End Sub




"Barb Reinhardt" wrote:

I think I'd put something like this in the Worksheet_Change event for the
worksheet in question.

http://www.mvps.org/dmcritchie/excel/event.htm
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Curt" wrote:

Want the module I have to be used only on the one worksheet. Where should
this module procedure be located. Presently it is in the list under modules
in the project.
It calls when return key is depressed. Looking it seems that it should be in
only the window opened when you ckeck the worksheet. Is this correct. Also
should the sub br called private? Or would it be private if within the sheet
code? I copy data from this sheet to others. that is when it activates on
other sheets.
Thanks

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
Code for a button to change cell location Michael B Excel Discussion (Misc queries) 1 November 30th 07 04:30 PM
Code for Select a file and save it in a different location Oggy Excel Programming 2 April 22nd 07 03:58 PM
VB Code Location; sheet, workbook, module James Hamilton Excel Programming 2 June 22nd 05 08:08 AM
Need help with code location PL EASE PCOR Excel Programming 3 February 18th 05 08:15 AM
File Location code Rohit Thomas Excel Programming 5 August 21st 03 11:22 PM


All times are GMT +1. The time now is 03:54 AM.

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"