Results 1 to 10 of 10

Basic Loop Trouble - need to convert active sheet to integer

Threaded View

  1. #1
    Registered User
    Join Date
    05-05-2009
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    68

    Question Basic Loop Trouble - need to convert active sheet to integer

    I'm new to usign loops and I've run into a bit of trouble, I need to use a loop to add a value of 1 to the workseets name on each repetition. The worksheets are all named with single numbers but I'm not sure how to convet the active sheet reference into an integer t hat I can use to add a value to. I also tried



    
    Dim Order As String, i As Integer
    Order = ActiveSheet.Name
    
    Dim OrderNum As Integer
    OrderNum = Order
    
    
    For i = 1 To 21
    
    
    Code Goes here
    
        
    Sheets(OrderNum + 1).Activate
    
    Next i
    I also tried

    
    Dim Order A, i As Integer
    Order = ActiveSheet.Name
    
    
    For i = 1 To 21
    
    
    Code Goes here
    
        
    Sheets(Order + 1).Activate
    
    Next i
    I also tried

    
    Dim Order as String = ActiveSheet.Name
    
    Dim OrderNumber As Integer = Convert.ToInt32(Order)
    Any assistance greatly appreciated

    Thanks
    Last edited by mick86; 09-16-2012 at 03:39 PM.

Thread Information

Users Browsing this Thread

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

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