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  dBforums > PC based Database Applications > Microsoft Excel > help me with this problem plzz

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-04, 00:51
wintersnow wintersnow is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Exclamation help me with this problem plzz

can anyone help me out on this qns plz?

how do you write the code for the following situation:

if there are sheet1 and sheet2, and the cells correspond to each other,how do u type the code for macro in VB? when any cells in sheet2 is being edited, moved or deleted, the corresponding cells in sheet 1 is being highlighted automatically

plz help me ASAP by posting the code on this thread or send the codes to et85_wintersnow@hotmail.com
Reply With Quote
  #2 (permalink)  
Old 12-03-04, 04:45
DavidCoutts DavidCoutts is offline
Registered User
 
Join Date: Jan 2004
Location: Aberdeen, Scotland
Posts: 1,067
Something like this
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Worksheets("Sheet2").Range(Target.Address).Value <> _
            Worksheets("Sheet1").Range(Target.Address).Value Then
        Worksheets("Sheet1").Range(Target.Address).Interior.ColorIndex = 3
    End If
End Sub
dave
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On