Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help its not working


I'm trying to add items into a listbox using the code:

Private Sub ListBox3_Click()

ListBox3.ColumnCount = 4
ListBox3.AddItem ("West")
ListBox3.AddItem (East)
ListBox3.AddItem (North)
ListBox3.AddItem (South)
ListBox3.ColumnWidths = 200
UserForm1.Show

End Sub

but when i run the macro the list box is empty!

--
steph2
-----------------------------------------------------------------------
steph28's Profile: http://www.excelforum.com/member.php...fo&userid=3463
View this thread: http://www.excelforum.com/showthread.php?threadid=54405

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Help its not working

Hi Steph

Try the following

Private Sub ListBox3_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
ListBox3.ColumnCount = 4
ListBox3.AddItem "West"
ListBox3.AddItem "East"
ListBox3.AddItem "North"
ListBox3.AddItem "South"
ListBox3.ColumnWidths = 200
UserForm1.Show
ListBox3.Clear 'This is to clear the Listbox otherwise it will load
the items every time

End Sub

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
Calculate working days but change working week SamB Excel Discussion (Misc queries) 1 September 1st 08 09:17 PM
Making weekend days working days - the system cuts the working tim Fluffy Excel Discussion (Misc queries) 1 May 30th 08 10:02 PM
macro was working, now it's not working RichardO[_11_] Excel Programming 2 June 9th 04 06:27 AM
Macro working in Excel 2003; not working in Excel 2000 Leslie Barberie Excel Programming 5 May 20th 04 07:51 PM
Adding sales from a non working day to the previous working day Alex Excel Programming 1 September 19th 03 08:48 AM


All times are GMT +1. The time now is 09:03 AM.

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"