Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8394367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:02:25+00:00 2026-06-09T20:02:25+00:00

I have an Excel form which reads data from each row of an 80-row

  • 0

I have an Excel form which reads data from each row of an 80-row worksheet and populates each cell into a textbox.

The code for the initial form is below.

Private Sub UserForm_Initialize()

txtbox_revri_idnum.Text = Worksheets("Risk&Issues").Range("A4").Value
txtbox_revri_projname.Text = Worksheets("Risk&Issues").Range("B4").Value
txtbox_revri_isrefnum.Text = Worksheets("Risk&Issues").Range("C4").Value
txtbox_revri_riskrefnum.Text = Worksheets("Risk&Issues").Range("D4").Value
...
txtbox_revri_projname.SetFocus

End Sub

Ideally, what I’d like to do is when the ‘next’ button is pressed, the next row (A5, B5, C5, D5…) is parsed into an array, and the Range is updated with the next row’s data. Conversely, the ‘previous’ button would go in the reverse direction (A3, B3, C3, D3…). Essentially, I’d like to navigate up and down the worksheet reviewing the entire row with each cell in a new textbox.

I’ve tried all sorts of combinations of VBA (baring in mind I’m new to VBA although do have some Java and PHP experience). The code I have for my ‘next’ button current has the code below.

Private Sub button_revri_next_Click()

txtbox_revri_idnum.Text = ActiveCell.Next.Text
...
End Sub

Thank you… I know you guys are way more smarter than me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:02:27+00:00Added an answer on June 9, 2026 at 8:02 pm

    You can use .Offset to achieve what you want.

    TRIED AND TESTED

    Dim i As Long, j As Long
    Dim rng As Range
    
    Private Sub UserForm_Initialize()      
        Set rng = Worksheets("Risk&Issues").Range("A4")
    
        i = 0: j = 1
    
        txtbox_revri_idnum.Text = rng.Offset(i).Value
        txtbox_revri_projname.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_isrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_riskrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        '
        '
        txtbox_revri_projname.SetFocus
    End Sub
    
    '~~> Next Button
    Private Sub button_revri_next_Click()
        i = i + 1: j = 1
    
        If i > (Sheets("Risk&Issues").Rows.Count - 4) Then
            MsgBox "Max rows Reached"
            Exit Sub
        End If
    
        txtbox_revri_idnum.Text = rng.Offset(i).Value
        txtbox_revri_projname.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_isrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_riskrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        '
        '  
        txtbox_revri_projname.SetFocus
    End Sub
    

    Similarly Previous Button

    '~~> Previous Button
    Private Sub button_revri_prev_Click()
        i = i - 1: j = 1
    
        If i < 0 Then
            MsgBox "1st Row Reached"
            Exit Sub
        End If
    
        txtbox_revri_idnum.Text = rng.Offset(i).Value
        txtbox_revri_projname.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_isrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        txtbox_revri_riskrefnum.Text = rng.Offset(i, j).Value: j = j + 1
        '
        '  
        txtbox_revri_projname.SetFocus
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an excel workbook which needs to query data from an HTTP server.
I have a form which spawns from an excel add-in written with VSTO. I
I have created a macro for excel which will pop up form that contains
I have 12 excel files, each one with lots of data organized in 2
Using Rails 3.0.7. I have a simple form which shows all records from one
I have the following code to insert items into a MySQL database from an
I have a web form in which i have droped 6 dropdownlists and each
The setup: I have an excel doc with a form for entering data, the
Let's say I have an embedded Excel Spreadsheet on a Microsoft Access form. I
I have a excel file which is as follows . 1 Kr Veerappan 123

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.