+ Reply to Thread
Results 1 to 2 of 2

Problem with incremental statement

  1. #1
    Registered User
    Join Date
    07-10-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2010
    Posts
    28

    Problem with incremental statement

    Hi Frds,

    I have a problem in using Offset .

    Code Objective:
    I have 4 option buttons, i need to display the order in which the button are clicked. say if OptionButton1 is clicked, then in cell N1, it has to display "Button1" and then if Option Button 2 is clicked , in Cell N2 , "Button2" to be displayed

    Here is my code .. when i run it .. It is throwing error 6 at "x= x+1"

    Private Sub OptionButton1_Click()
    Dim x As Integer
    x = 2
    Do While Cells(x, 13) <> " "
    x = x + 1
    Loop
    Cells(x, 13).Value = " This is button 1"
    End Sub

    Same code for all the other 3 Optionbuttons ...

    Please help ..!!

    Thanks in Advance !

    Regards,
    Sri

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,033

    Re: Problem with incremental statement

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Never use Merged Cells in Excel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1