+ Reply to Thread
Results 1 to 4 of 4

Coding Problem

Hybrid View

Shazz Coding Problem 02-03-2012, 05:20 PM
Bob Phillips Re: Coding Problem 02-03-2012, 05:33 PM
Shazz Re: Coding Problem 02-03-2012, 05:48 PM
royUK Re: Coding Problem 02-04-2012, 03:55 AM
  1. #1
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Halstead
    MS-Off Ver
    Excel 365
    Posts
    240

    Coding Problem

    Hi All,

    I have the below code which worked fine, I have added and subtracted some boxes ComboBoxes, but now the code does not work, please could you have a look at the code to see what is wrong.

    Sub LoadData(SelRow)
    
       With Data
            If SelRow < 1 Or SelRow > .Cells(.Rows.Count, 1).End(xlUp).Row Then
                Label13.Visible = True
                Exit Sub
            End If
            Label13.Visible = False
            For col = 1 To 12
                Controls("TextBox" & col).Value = .Cells(SelRow, col).Value
            Next col
            For col = 13 To 20
                Controls("ComboBox" & col).Value = .Cells(SelRow, col).Value
                Next col
            ComboBox13.Value = .Cells(SelRow, 13).Value
            TextBox24.Value = .Cells(SelRow, 14).Value
            InstallDate.Value = .Cells(SelRow, 15).Value
            TextBox15.Value = .Cells(SelRow, 16).Value
            TextBox13.Value = .Cells(SelRow, 17).Value
            ComboBox15.Value = .Cells(SelRow, 18).Value
            TextBox25.Value = .Cells(SelRow, 19).Value
            InstallDate2.Value = .Cells(SelRow, 20).Value
            TextBox16.Value = .Cells(SelRow, 21).Value
            CheckDueDate2.Value = .Cells(SelRow, 22).Value
            ComboBox17.Value = .Cells(SelRow, 23).Value
            TextBox26.Value = .Cells(SelRow, 24).Value
            InstallDate3.Value = .Cells(SelRow, 25).Value
            TextBox17.Value = .Cells(SelRow, 26).Value
            CheckDueDate3 = .Cells(SelRow, 27).Value
            ComboBox19.Value = .Cells(SelRow, 28).Value
            TextBox27.Value = .Cells(SelRow, 29).Value
            TextBox18.Value = .Cells(SelRow, 30).Value
            TextBox21.Value = .Cells(SelRow, 31).Value
            TextBox20.Value = .Cells(SelRow, 32).Value
            ComboBox20.Value = .Cells(SelRow, 33).Value
            TextBox28.Value = .Cells(SelRow, 34).Value
            TextBox19.Value = .Cells(SelRow, 35).Value
            TextBox22.Value = .Cells(SelRow, 36).Value
            TextBox23.Value = .Cells(SelRow, 37).Value
            TextBox14.Value = .Cells(SelRow, 38).Value
            
                        End With
    End Sub
    Thanks

    Shazz
    xx
    Last edited by Shazz; 02-03-2012 at 06:29 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

    Re: Coding Problem

    Broken in what way? What happens, what should happen?

  3. #3
    Forum Contributor
    Join Date
    03-31-2009
    Location
    Halstead
    MS-Off Ver
    Excel 365
    Posts
    240

    Re: Coding Problem

    I have attached my worksheet for you to have a look at, that would be easier rather than me trying to explain it.

    Shazz
    xx

    I have managed to figure this out myself, thanks
    Attached Files Attached Files
    Last edited by Shazz; 02-03-2012 at 06:28 PM. Reason: edit text

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Coding Problem

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST

    You've also marked this as solved!!!
    Hope that helps.

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

    Free DataBaseForm example

+ 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