Aug 28, 2003 #1 vaneagle Technical User Apr 23, 2003 71 AU Hi, Does anyone know how to find, using VBA, the first sheet in a workbook? Issue is that the name of the sheet could be anything. Purely depends on what the user decides to call it!! Thansk in advance...
Hi, Does anyone know how to find, using VBA, the first sheet in a workbook? Issue is that the name of the sheet could be anything. Purely depends on what the user decides to call it!! Thansk in advance...
Aug 28, 2003 1 #2 dan1967 Technical User Jul 2, 2003 181 US You could try: Code: Dim SName As String ActiveWorkbook.Sheets(1).Select SName = ActiveWorkbook.Sheets(1).Name This should select the first worksheet and populate the variable SName with the sheet name for later use. Dan. Upvote 0 Downvote
You could try: Code: Dim SName As String ActiveWorkbook.Sheets(1).Select SName = ActiveWorkbook.Sheets(1).Name This should select the first worksheet and populate the variable SName with the sheet name for later use. Dan.
Aug 28, 2003 Thread starter #3 vaneagle Technical User Apr 23, 2003 71 AU Excellent. Thanks for that Dan... have a star!! Upvote 0 Downvote
Aug 28, 2003 #4 dan1967 Technical User Jul 2, 2003 181 US Thanks for the star. Good luck. Dan. Upvote 0 Downvote