LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Referencing cells to VB

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:H10")) Is Nothing Then
With Target
If .Value = "M" Then
userfcorm1.Show
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"CTInt04" wrote in message
...
Problem:

I am trying to reference cells on a worksheet that is below the main data

in the worksheet. When a cell with "M" in it is clicked, a userform appears
that should displays the hours in a txtbox that correspond to that date and
that person. The hours are referenced from the info below in rows 7-10.


Worksheet:
A B C D E
1 Bill Tom Tim Kim
2 7/1 M J F M
3 7/2 N F J S
4 7/3 F M S S
5
6
7 7/1 4 2
8 7/3 3
9
10


Please help!!! And give suggestions. thanx.
- CDotWin



 
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
referencing cells based on conditions in other cells mirskman Excel Discussion (Misc queries) 1 January 29th 09 09:57 PM
Referencing several cells with IF? andim Excel Worksheet Functions 2 June 16th 08 11:24 AM
Referencing other cells vfoley Excel Discussion (Misc queries) 4 April 30th 07 05:30 PM
Referencing Cells Bill W Excel Worksheet Functions 0 August 4th 05 05:10 PM
Referencing Cells Sok Hong Excel Programming 1 August 5th 03 02:28 PM


All times are GMT +1. The time now is 02:18 PM.

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"