Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default remove item fr listbox (correction)

Sory earlier my question was not very clear.i write again.I have following
code."ROSTER" is the sheet name,paizapm is the range name,all I want display
input box to look for the search weather in the listbox or not,if in the
listbox I want to remove.But I tried so hard could not fix the remove item
from the listbox.Any helpful souls?Thanks in advance
Dim farx As Range
UserForm1.ListBox1.RowSource = "Roster!paizapm"
Dim Title, Default
Dim PMname As Variant
Title = "Please enter the value you want to find?"
PMname = InputBox(Title, Default, 100, 100)
Set farx = Cells.Find(What:=PMname)
If farx Is Nothing Then
MsgBox "There is no item called as " & PMname
Else
'*****HERE HOW CAN I REMOVE THE ""PMname""*****
End If

--
Regards,
Baha
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default remove item fr listbox (correction)

Dim farx As Range
UserForm1.ListBox1.RowSource = "Roster!paizapm"
Dim Title, Default
Dim PMname As Variant
Title = "Please enter the value you want to find?"
PMname = InputBox(Title, Default, 100, 100)
Set farx = Cells.Find(What:=PMname)
If farx Is Nothing Then
MsgBox "There is no item called as " & PMname
Else
UserForm1.ListBox1.RowSource = ""
doevents
farx.EntireRow.delete
UserForm1.ListBox1.RowSource = "Roster!paizapm"
End If

--
Regards,
Tom Ogilvy


"Baha" wrote:

Sory earlier my question was not very clear.i write again.I have following
code."ROSTER" is the sheet name,paizapm is the range name,all I want display
input box to look for the search weather in the listbox or not,if in the
listbox I want to remove.But I tried so hard could not fix the remove item
from the listbox.Any helpful souls?Thanks in advance
Dim farx As Range
UserForm1.ListBox1.RowSource = "Roster!paizapm"
Dim Title, Default
Dim PMname As Variant
Title = "Please enter the value you want to find?"
PMname = InputBox(Title, Default, 100, 100)
Set farx = Cells.Find(What:=PMname)
If farx Is Nothing Then
MsgBox "There is no item called as " & PMname
Else
'*****HERE HOW CAN I REMOVE THE ""PMname""*****
End If

--
Regards,
Baha

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default remove item fr listbox (correction)

First of all thanks for reply Mr.Tim. Do I have to delete entire row just
the delete items from the listbox?Actually all I want is,I have two different
array, pmlist and farx.pmlist is the main list and farx is assignment list
which all the names also in the pmlist. I want have a listbox which rowsource
from pmlist(mainlist) but remove the name which are already in farx list.
--
Regards,
Baha


"Tom Ogilvy" wrote:

Dim farx As Range
UserForm1.ListBox1.RowSource = "Roster!paizapm"
Dim Title, Default
Dim PMname As Variant
Title = "Please enter the value you want to find?"
PMname = InputBox(Title, Default, 100, 100)
Set farx = Cells.Find(What:=PMname)
If farx Is Nothing Then
MsgBox "There is no item called as " & PMname
Else
UserForm1.ListBox1.RowSource = ""
doevents
farx.EntireRow.delete
UserForm1.ListBox1.RowSource = "Roster!paizapm"
End If

--
Regards,
Tom Ogilvy


"Baha" wrote:

Sory earlier my question was not very clear.i write again.I have following
code."ROSTER" is the sheet name,paizapm is the range name,all I want display
input box to look for the search weather in the listbox or not,if in the
listbox I want to remove.But I tried so hard could not fix the remove item
from the listbox.Any helpful souls?Thanks in advance
Dim farx As Range
UserForm1.ListBox1.RowSource = "Roster!paizapm"
Dim Title, Default
Dim PMname As Variant
Title = "Please enter the value you want to find?"
PMname = InputBox(Title, Default, 100, 100)
Set farx = Cells.Find(What:=PMname)
If farx Is Nothing Then
MsgBox "There is no item called as " & PMname
Else
'*****HERE HOW CAN I REMOVE THE ""PMname""*****
End If

--
Regards,
Baha

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
Last Item of Listbox not getting displayed Raj Excel Discussion (Misc queries) 0 April 22nd 08 10:58 AM
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:27 AM
Add item to listbox, but only if it is not already there. Mark Excel Programming 4 September 2nd 05 10:07 PM
listbox remove Item Simon Shaw Excel Programming 3 July 3rd 05 10:14 PM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM


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