+ Reply to Thread
Results 1 to 8 of 8

Offset

  1. #1
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    131

    Question Offset

    Hi Dears,

    Anybody can help me that how to use offset command on UserForm.


    Thanks

    Syed Haider Ali

  2. #2
    Chip Pearson
    Guest

    Re: Offset

    You need to provide much more detail about what you are trying to
    do.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Syed Haider Ali"
    <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi Dears,
    >
    > Anybody can help me that how to use offset command on UserForm.
    >
    >
    > Thanks
    >
    > Syed Haider Ali
    >
    >
    > --
    > Syed Haider Ali
    > ------------------------------------------------------------------------
    > Syed Haider Ali's Profile:
    > http://www.excelforum.com/member.php...o&userid=21994
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=398684
    >




  3. #3
    Registered User
    Join Date
    04-20-2005
    Posts
    12
    Since this subject is posted, I have an additional question.

    How do you use an offset in a Range .Select

    worksheet.Range("A1:C1") .Select

    the Cell C1 is a calculated field based on number of columns being added. I tried to use the following format that worked for mapping an element, but can't make it work in the Range statement above. Also, can the offset be zerio.

    actColumn = actColumn + 1
    set xp = worksheet.Range("A1:A2").Offset(1,actColumn).Xpath
    xp.SetValue workbook.XmlMaps(1), strXPath

    Thanks
    Robert

  4. #4
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    131

    Question Re: Offset

    Dear Chip Pearson and Roblo,

    Actually i have a Table just like below

    A B C
    1 10000 Capital Account 1,000,000,000
    2 20000 Long Term Liability 650,000,000
    3 30000 Short Term Finances 115,000,000
    4 40000 Assets 2,500,000,000
    5 50000 Stocks 897,000

    Also i have a user form where i put col "B" in a comboBox, and when i select the comboBox the corresponding value from Col "C" shows in Textbox. For this i am using following codes

    Private Sub UserForm_activate()
    Sheet1.Activate
    ComboBox1.ColumnCount = 1
    ComboBox1.RowSource = "b1:b5"
    End Sub

    Private sub ComboBox1_aferupdate()

    textbox1 = Application.WorksheetFunction.VLookup(ComboBox1, Sheet1.Range_("b2:c5"), 2, False)

    End Sub

    I need codes that when I select somthing from Col "B" through ComboBox, then the corresponding value from Col "A" will be shown in Textbox (instead of from Col "C")

    Thanks

    Syed Haider Ali

  5. #5
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    131

    Question Re: Offset

    Hi Dears,

    Can anybody help me regarding above

  6. #6
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    131

    Offset command

    Hi

    Is there any solution?

  7. #7
    Dave Peterson
    Guest

    Re: Offset

    I'm not sure I understand, but maybe...

    Option Explicit
    Private Sub ComboBox1_Change()
    If Me.ComboBox1.ListIndex > -1 Then
    Me.TextBox1.Text = Sheet1.Range("a1:A5")(Me.ComboBox1.ListIndex + 1)
    End If
    End Sub
    Private Sub UserForm_Initialize()
    Me.ComboBox1.RowSource = Sheet1.Range("b1:b5").Address(external:=True)
    End Sub





    Syed Haider Ali wrote:
    >
    > Dear Chip Pearson and Roblo,
    >
    > Actually i have a Table just like below
    >
    > A B C
    >
    > 1 10000 Capital Account 1,000,000,000
    > 2 20000 Long Term Liability 650,000,000
    > 3 30000 Short Term Finances 115,000,000
    > 4 40000 Assets 2,500,000,000
    > 5 50000 Stocks 897,000
    >
    > Also i have a user form where i put col "B" in a comboBox, and when i
    > select the comboBox the corresponding value from Col "C" shows in
    > Textbox. For this i am using following codes
    >
    > Private Sub UserForm_activate()
    > Sheet1.Activate
    > ComboBox1.ColumnCount = 1
    > ComboBox1.RowSource = "b1:b5"
    > End Sub
    >
    > Private sub ComboBox1_aferupdate()
    >
    > textbox1 = Application.WorksheetFunction.VLookup(ComboBox1,
    > Sheet1.Range_("b2:c5"), 2, False)
    >
    > End Sub
    >
    > I need codes that when I select somthing from Col "B" through ComboBox,
    > then the corresponding value from Col "A" will be shown in Textbox
    > (instead of from Col "C")
    >
    > Thanks
    >
    > Syed Haider Ali
    >
    > --
    > Syed Haider Ali
    > ------------------------------------------------------------------------
    > Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
    > View this thread: http://www.excelforum.com/showthread...hreadid=398684


    --

    Dave Peterson

  8. #8
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    131

    Arrow Re:

    Hi Dave Peterson,

    It is doing properly, It solve my Problem

    Thanks a lot off.

    Syed Haider Ali

+ 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