Results 1 to 5 of 5

Thread: Get Setting with an option button

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    14

    Get Setting with an option button

    I'm trying to get the setting of an option button (optEast) (optWest) but every time i push the play button it says "Invalid call procedure or argument" any help?

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Get Setting with an option button

    send us some code

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    14

    Re: Get Setting with an option button

    ok thats kinda hard cause its on the other computer..

    but heres my Form_Load code (which has the Get Settings stuff in it)

    Code:
    Private Sub Form_Load()
    txtAccount.Text = GetSetting(App.EXEName, "Settings", "txtAccount", vbNullString)
    txtPassWord.Text = GetSetting(App.EXEName, "Settings", "txtPassword", vbNullString)
    txtMessage.Text = GetSetting(App.EXEName, "Settings", "txtMessage", vbNullString)
    txtGame.Text = GetSetting(App.EXEName, "Settings", "txtGame", vbNullString)
    txtCDKey.Text = GetSetting(App.EXEName, "Settings", "txtCDKey", vbNullString)
    txtTime.Text = GetSetting(App.EXEName, "Settings", "txtTime", vbNullString)
    optEast.Value = GetSetting(App.EXEName, "Settings", "optEast", vbNullString)
    optWest.Value = GetSetting(App.EXEName, "Settings", "optWest", vbNullString)
    End Sub
    
    ----------Form Load Sub ^ ^----------
    
    ----------Save Settings Sub Below-------
    
    Private Sub cmdSave_Click()
    SaveSetting App.EXEName, "Settings", "txtAccount", txtAccount.Text
    SaveSetting App.EXEName, "Settings", "txtPassWord", txtPassWord.Text
    SaveSetting App.EXEName, "Settings", "txtCDKey", txtCDKey.Text
    SaveSetting App.EXEName, "Settings", "txtTime", txtTime.Text
    SaveSetting App.EXEName, "Settings", "txtMessage", txtMessage.Text
    SaveSetting App.EXEName, "Settings", "txtGame", txtGame.Text
    SaveSetting App.EXEName, "Settings", "optEast", optEast.Value
    SaveSetting App.EXEName, "Settings", "optWest", optWest.Value
    End Sub

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: Get Setting with an option button

    The 4th parameter of GetSetting is for a default value if there is no value stored in the registry. You are getting the error because the Value of an option button must be True or False. Change that parameter to True or False (or leave it out) and you should be OK.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    14

    Re: Get Setting with an option button

    i took .value out, and it says the same error, i also tried switching it too True, and it had the same error..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width