Results 1 to 12 of 12

Create Vertical Scrolling Text in UserForm

Threaded View

  1. #1
    Registered User
    Join Date
    03-24-2020
    Location
    India
    MS-Off Ver
    2013
    Posts
    6

    Post Create Vertical Scrolling Text in UserForm

    Trying to create a userform in VBA excel where in the text can be scrolled vertically to show what I add in specific cells of excel. I am using version 2016 of excel.

    Have taken VBA code from google which is given below:

    Private Sub UserForm_Initialize()
    Me.Label1.Caption = Sheet1.Range("b4").Value
    Me.Label2.Caption = Sheet1.Range("E9").Value & vbCrLf & vbCrLf & Sheet1.Range("E10").Value & vbCrLf & vbCrLf & Sheet1.Range("E11").Value & vbCrLf & vbCrLf & Sheet1.Range("E12").Value & vbCrLf & vbCrLf & Sheet1.Range("E13").Value
    Me.Label2.Top = Me.Height
    End Sub

    This part of code works well when I comment "Me.Label2.Top = Me.Height" this part of the code.

    The second part of the code is for Vertical Scroll where in the scrolling happens however the loop where in the scrolling has to be repeated is not working. Code given below:

    Sub verti_scroll()
    Call UserForm1.Show(vbModeless)
    
    Do
    i = UserForm1.Height - 42
    
    Do
    i = i - 1
        DoEvents
        For a = i To 5000000
        a = a + 1
        Next
        UserForm1.Label2.Top = i
        If i = 100 Then GoTo Nextz
        
    Loop
    Nextz:
    x = x + 1
    If x = 2 Then GoTo nextx
    Loop
    nextx:
    End Sub
    Attached Files Attached Files
    Last edited by AliGW; 04-27-2024 at 01:20 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. scrolling down vertical bar automatically
    By mark_neil2 in forum Excel General
    Replies: 3
    Last Post: 12-22-2015, 09:20 AM
  2. [SOLVED] Create A UserForm that tracks points and allows scrolling and use of worksheet
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2015, 12:13 PM
  3. Freeze column so always on top vertical scrolling?
    By Emma Frost in forum Excel General
    Replies: 4
    Last Post: 03-31-2015, 10:58 AM
  4. Excel 2007 : Vertical Scrolling in Excel
    By mdgajes in forum Excel General
    Replies: 1
    Last Post: 12-16-2011, 11:39 AM
  5. Vertical scrolling chart?
    By PhilT in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-20-2007, 08:48 AM
  6. [SOLVED] how do I create a single row of vertical text?
    By computermomma in forum Excel General
    Replies: 1
    Last Post: 09-17-2005, 11:05 AM
  7. How to create a text scrolling window?
    By Rickk in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-28-2005, 11:06 PM

Tags for this Thread

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