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: 58
Default Excel programming errors for copying and pasting

I have been trying to use controls ( I am new) in excel. I want to have lists
that users can select (multiple choices from) push a command button and the
values will be copied and pasted to another list box. I copied code from a
book I bought and named everything as described - but I am getting the
following error:

invalid qualifier

This is the code

Sub Button3_Click()
Dim i As Integer
Dim ListBox1 As Long

If ListBox1.ListIndex = -1 Then Exit Sub
If Not cbDuplicates Then
' See if item already exists
For i = 0 To ListBox2.ListCount - 1
If ListBox1 = ListBox2.List(i) Then
Beep
Exit Sub
End If
Next i
End If
ListBox2.AddItem ListBox1.Value


End Sub

 
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
Programming around Vlookup Errors in VBA Elceller in distress[_2_] Excel Programming 2 August 1st 06 10:33 PM
Programming around vlookup errors in vba Elceller in distress Excel Programming 0 August 1st 06 08:56 PM
Copying from Excel - pasting in Publisher vman252 Excel Worksheet Functions 0 March 20th 06 12:03 AM
copying from word and pasting into excel nims[_4_] Excel Programming 1 August 24th 05 08:24 PM
Need Help with Programming-Syntax/Compile Errors clk[_2_] Excel Programming 6 January 17th 05 11:21 PM


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