Results 1 to 5 of 5

repetitive macros-solved

Threaded View

  1. #1
    Registered User
    Join Date
    12-03-2009
    Location
    yorkshire, england
    MS-Off Ver
    Excel 2003
    Posts
    15

    repetitive macros-solved

    I have a work book with several (couple of hundred) buttons, which when clicked display the contents of a range of cells in a message box as shown below;

    Sub v103_Click()
     
    MsgBox Join(Application.Transpose(Application.Transpose(Range("Sheet1!A103:Sheet1!J103"))), Chr(10))
     
    End Sub
    
    Sub v104_Click()
     
    MsgBox Join(Application.Transpose(Application.Transpose(Range("Sheet1!A104:Sheet1!J104"))), Chr(10))
     
    End Sub
    
    Sub v105_Click()
     
    MsgBox Join(Application.Transpose(Application.Transpose(Range("Sheet1!A105:Sheet1!J105"))), Chr(10))
     
    End Sub
    Does anyone know of a more efficent way of coding this rather than copy,paste,edit,copy,paste,edit,copy,paste,edit........ad infinitum.
    Last edited by henrysmith; 12-06-2009 at 12:26 PM.

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