Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Sheet Code

Question - I have a pull down menu in Cell T. I want excel to copy Cell T to
Cell U when I double click on Cell T after selecting something from the pull
down menu (similar to what it does below). Can you add another procedure to
the sheet code already created for this workbook or is this not possible?
See below for current sheet code used.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not
Application.Intersect(Range("n8:n207,q8:q207,y8:y2 07,ab8:ab207,ae8:ae207,ah8:ah207,ak8:ak207,an8:an2 07,aq8:aq207,at8:at207,aw8:aw207,az8:az207,bc8:bc2 07"),
Target) Is Nothing Then
'For a range use
'If Not Application.Intersect(Range("A1:A20"), Target) Is Nothing Then

On Error GoTo endit
Application.EnableEvents = False
Application.ScreenUpdating = False

With Target
.Value = "R"
.Offset(0, 1).Copy
.Offset(0, 2).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks _
:=False, Transpose:=False
End With
Application.CutCopyMode = False
End If
Cancel = True
Range("as7").Select

endit:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub


Thanks for any help you can provide

Robert B.


 
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
Sheet Name Changes how do i code for that Sonic Excel Worksheet Functions 0 July 10th 07 08:58 PM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
VBA code to identify last row in a sheet SharonP. Excel Discussion (Misc queries) 4 February 17th 06 02:15 PM
Sheet Protection and VBA Code TheRobsterUK Excel Discussion (Misc queries) 1 May 27th 05 05:18 PM
Select sheet with VB code Dunmarie Excel Discussion (Misc queries) 1 January 12th 05 03:44 PM


All times are GMT +1. The time now is 07:03 PM.

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"