473,395 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

invalid use of proprety

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmd1_Click()
  2. If ch1.Value = 1 Then
  3. lst1.Visible = True
  4. lbl1.Visible = True
  5. End If
  6. If ch2.Value = 1 Then
  7. lst2.Visible = True
  8. lbl2.Visible = True
  9. End If
  10. If ch3.Value = 1 Then
  11. lst3.Visible = True
  12. lbl3.Visible = True
  13. End If
  14. End Sub
  15. Private Sub cmd2_Click()
  16. W = InputBox("")
  17. For C = 0 To 4
  18. If lst1.List(C) = W Then
  19. lst1.Visible = True
  20. lst1.ListIndex lst1.List(C)****************************************
  21. Exit For
  22. End If
  23. If lst2.List(C) = W Then
  24. lst2.Visible = True
  25. Exit For
  26. End If
  27. If lst3.List(C) = W Then
  28. lst3.Visible = True
  29. Exit For
  30. End If
  31. Next C
  32.  
  33. End Sub
  34. Private Sub Form_Load()
  35. lst1.Visible = False
  36. lst2.Visible = False
  37. lst3.Visible = False
  38. lbl1.Visible = False
  39. lbl2.Visible = False
  40. lbl3.Visible = False
  41. ch1.Value = 0
  42. ch2.Value = 0
  43. ch3.Value = 0
  44. lst1.AddItem "prokly"
  45. lst1.AddItem "potato"
  46. lst1.AddItem "tomato"
  47. lst1.AddItem "onion"
  48. lst1.AddItem "garlic"
  49. lst2.AddItem "apple"
  50. lst2.AddItem "orange"
  51. lst2.AddItem "strawberry"
  52. lst2.AddItem "bannana"
  53. lst2.AddItem "beach"
  54. lst3.AddItem "sheep"
  55. lst3.AddItem "beef"
  56. lst3.AddItem "pig"
  57. lst3.AddItem "fish"
  58. lst3.AddItem "chicken"
  59. End Sub
can you please help mehelp me
Mar 4 '07 #1
3 1252
willakawill
1,646 1GB
Hi you can't use the listindex property like that:
Expand|Select|Wrap|Line Numbers
  1. lst1.ListIndex lst1.List(C)
What are you trying to do with this bit of code?
Mar 5 '07 #2
vijaydiwakar
579 512MB
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmd1_Click()
  2. If ch1.Value = 1 Then
  3. lst1.Visible = True
  4. lbl1.Visible = True
  5. End If
  6. If ch2.Value = 1 Then
  7. lst2.Visible = True
  8. lbl2.Visible = True
  9. End If
  10. If ch3.Value = 1 Then
  11. lst3.Visible = True
  12. lbl3.Visible = True
  13. End If
  14. End Sub
  15. Private Sub cmd2_Click()
  16. W = InputBox("")
  17. For C = 0 To 4
  18. If lst1.List(C) = W Then
  19. lst1.Visible = True
  20. lst1.ListIndex lst1.List(C)****************************************
  21. Exit For
  22. End If
  23. If lst2.List(C) = W Then
  24. lst2.Visible = True
  25. Exit For
  26. End If
  27. If lst3.List(C) = W Then
  28. lst3.Visible = True
  29. Exit For
  30. End If
  31. Next C
  32.  
  33. End Sub
  34. Private Sub Form_Load()
  35. lst1.Visible = False
  36. lst2.Visible = False
  37. lst3.Visible = False
  38. lbl1.Visible = False
  39. lbl2.Visible = False
  40. lbl3.Visible = False
  41. ch1.Value = 0
  42. ch2.Value = 0
  43. ch3.Value = 0
  44. lst1.AddItem "prokly"
  45. lst1.AddItem "potato"
  46. lst1.AddItem "tomato"
  47. lst1.AddItem "onion"
  48. lst1.AddItem "garlic"
  49. lst2.AddItem "apple"
  50. lst2.AddItem "orange"
  51. lst2.AddItem "strawberry"
  52. lst2.AddItem "bannana"
  53. lst2.AddItem "beach"
  54. lst3.AddItem "sheep"
  55. lst3.AddItem "beef"
  56. lst3.AddItem "pig"
  57. lst3.AddItem "fish"
  58. lst3.AddItem "chicken"
  59. End Sub
can you please help mehelp me
u can't use that the way u've done simply put c's value there if problem still persists then explain thy problem indetail
Good Luck
Mar 5 '07 #3
what is your problem about that code...
please be specific

gud day
Mar 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Gerson Kurz | last post by:
I stumbled across this (while using my homebrewn enum class): class test: pass instance = test() setattr(instance, "THIS :*2+~# IS OBVIOUSLY INVALID", 123) I would've expected some kind of...
0
by: James Thornton | last post by:
I'm running PG 7.2.3, and I am getting these notices when running vacuum analzye: spower=# vacuum analyze; NOTICE: Rel sec_browser_properties: TID 935/15: OID IS INVALID. TUPGONE 0. NOTICE: ...
8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
3
by: Stefano | last post by:
I've a form windows with a lot of textbox controls. How can I do if I have to save all text proprety of this controls in an external file, to reload them in future?
9
by: MR | last post by:
I get the following Exception "The data at the root level is invalid. Line 1, position 642" whenever I try to deserialize an incoming SOAP message. The incoming message is formed well and its...
2
by: none | last post by:
Hi, I'm opening a popup window with JavaScript. It has a command button. This is from the primary source (opener) window: ###################################################################...
3
by: fazulu deen | last post by:
Hi all, For the following code : file_ptr = fopen("pass_fail.txt", "a"); // error line 393 fdisplay(file_ptr, "Test Passed"); fclose(file_ptr);
4
by: robert | last post by:
On a server the binary (red hat) installed python2.4 and also a fresh compiled python2.5 spits "sem_post: Invalid argument". What is this and how can this solved? Robert ============== ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.