+ Reply to Thread
Results 1 to 14 of 14

Display data using label on userform

Hybrid View

stoey Display data using label on... 11-27-2008, 02:34 PM
Bob Phillips You have to offset from a... 11-27-2008, 02:40 PM
stoey hi, can you show me a... 11-27-2008, 02:42 PM
stoey hi i tried ... 11-27-2008, 02:46 PM
royUK This will display the... 11-27-2008, 02:50 PM
stoey hi roy, thanks for the... 11-27-2008, 02:55 PM
shg lbltitle.Caption =... 11-27-2008, 02:57 PM
stoey Solve 11-27-2008, 02:59 PM
royUK Why do you need the Offset?... 11-27-2008, 03:03 PM
stoey solve 11-27-2008, 03:17 PM
royUK please mark the thread solved... 11-27-2008, 03:50 PM
stoey Solve 11-27-2008, 04:18 PM
VBA Noob Try marking as solved first. ... 11-27-2008, 04:30 PM
stoey thanks for the info vbanoob 11-27-2008, 04:39 PM
  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Display data using label on userform

    hi again,

    anyone know how to display data using label on userform? I tried using offset but it doesnt work. The data I want to display is in column G. How do i go about that?

    here's the code i tried
    lbltitle.Caption = Offset(0, 3).Value
    Thanks,

    stoey
    Last edited by stoey; 11-27-2008 at 04:39 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284
    You have to offset from a cell, so you need to specify which cellusing theRange property.

  3. #3
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi,

    can you show me a sample declaration bob?

    thanks

  4. #4
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi

    i tried
    lbltitle.Caption = Cells.Offset(0, 6)
    but it returns an error 'Run time error 1004' Application define or object define error

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This will display the contents of F1
    lbltitle.Caption = Cells(1, 1).Offset(0, 6).Value
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi roy,


    thanks for the reply. if I want to display the content of column G1 which part should I modify?

    thanks,

    stoey

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    lbltitle.Caption = Range("G1").Text
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Solve

    hi

    i got it...i change the cells (1,1) to cells (10,1) sorry my mistake, I was referring to column G row 10. Its all working now. Thanks Roy.

    Stoey

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why do you need the Offset? Display G10:
    lbltitle.Caption = cells(10,7).Text

  10. #10
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    solve

    thanks shg and roy...i got it working now

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    please mark the thread solved & rate the answer(s)

  12. #12
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Solve

    hi,

    how do I rate the answer?

    thanks,

    stoey

  13. #13
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try marking as solved first.

    Go to first post
    Click Edit
    Advance
    Top left is a dropdown marked No prefix
    Change to Solved
    Tick ok

    To rate a thread

    Top left of Roy's post there is a symbol that looks like a silver scale. Click on that

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  14. #14
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    thanks for the info vbanoob

+ 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