+ Reply to Thread
Results 1 to 3 of 3

Not getting correct output value( Label & (i-6) & .Top)

Hybrid View

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    24

    Not getting correct output value( Label & (i-6) & .Top)

    Hi All,

    When my code is running i didnt get the correct output value.

    My code is look like

    Label & (i-6) & .Top

    Here i is a variable if i =9 then i want i-6=9-6=3. So i want Label3.Top value.But i am not getting the correct result. Can anyone please Correct me?


    Thanks,
    Ann

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Not getting correct output value( Label & (i-6) & .Top)

    You could try with:
    Me.Controls("label" & i-6).Top
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Not getting correct output value( Label & (i-6) & .Top)

    While I am trying like this

    Set ctl1 = Me.Frame1.Controls.Add("Forms.Label.1", "Label" & (i + 1), True)
        With ctl1
            .Caption = "Enter Patch"
            '.Top = Label3.Top + (Label3.Top - Label2.Top)
            .Top = ("Label" & i-6).top
            .Left = Label3.Left
        End With
    I got compilation syntax error.

    ---------- Post added at 01:14 PM ---------- Previous post was at 01:09 PM ----------

    Superb.. I got the result..
    Really Thanks ji...
    Last edited by Cutter; 08-31-2012 at 07:25 PM. Reason: Added code tags

+ 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