Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default copy the drop down list value and paste to next column

Dear all,

I made a label form by a drop down list via validation function in A1:A12
for the junior (source is in another sheet of the same workbook), once the
user choose a value from the drop down list, I need the excel copy the
current cell to next two columns in the same row.

I also failed in using "Is Notempty" event in similar coding.....


Private Sub Worksheet_Change(ByVal Target As Range)


Application.EnableEvents = False

If Not Intersect(Target, Me.Range("A1:A12")) Is Nothing Then
With Target
Me.Range.Copy
Me.Range.Offset(0, 1).Paste


End With
End If

Application.EnableEvents = True


Best Regards,

Norika




Thanks to Bob Phillips give me many hints but I still failed to do so. :-(





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default copy the drop down list value and paste to next column

Hi Norika,

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo XIT
Application.EnableEvents = False

If Not Intersect(Target, Me.Range("A1:A12")) Is Nothing Then
If Not IsEmpty(Target) Then
With Target
.Copy
.Resize(1, 2).Offset(0, 1) = .Value

End With
End If
End If
XIT:
Application.EnableEvents = True
End Sub

---
Regards,
Norman



"norika" wrote in message
...
Dear all,

I made a label form by a drop down list via validation function in A1:A12
for the junior (source is in another sheet of the same workbook), once the
user choose a value from the drop down list, I need the excel copy the
current cell to next two columns in the same row.

I also failed in using "Is Notempty" event in similar coding.....


Private Sub Worksheet_Change(ByVal Target As Range)


Application.EnableEvents = False

If Not Intersect(Target, Me.Range("A1:A12")) Is Nothing Then
With Target
Me.Range.Copy
Me.Range.Offset(0, 1).Paste


End With
End If

Application.EnableEvents = True


Best Regards,

Norika




Thanks to Bob Phillips give me many hints but I still failed to do so. :-(







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
how do I copy and paste a drop down list in excel? Adriana Excel Worksheet Functions 3 April 2nd 23 07:34 PM
copy/paste drop down boxes (forms) without locking cell link? ryerye Excel Discussion (Misc queries) 1 July 13th 07 04:49 AM
Copy/Paste Drop Down List Ivano Excel Worksheet Functions 0 March 31st 06 05:49 PM
how do i copy drop down lists and paste them KJP Excel Discussion (Misc queries) 1 October 7th 05 02:49 PM
Copy & Paste Drop Down Box with Macros Lana Excel Programming 0 November 11th 04 03:28 PM


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