Results 1 to 5 of 5

Workbook A creates B & uses worksheet names from A in B

Threaded View

  1. #1
    Registered User
    Join Date
    05-04-2011
    Location
    Monticello, IN
    MS-Off Ver
    Excel 2016
    Posts
    18

    Workbook A creates B & uses worksheet names from A in B

    Seems simple but I feel that I messed it up good. I have the code listed have a "script not of range" error, but I am sure that other things are wrong as well. Help

    Here is my code:

    Sub Workbook_CheckExpenseChanges()
        Dim OutApp As Excel.Application
        Dim OutExcel As Excel.ListObject
        Dim all_names As String
        Dim wb As Workbook
        Dim ws As Worksheet
        Dim ws_name As String
        Application.ScreenUpdating = False
        Set OutApp = CreateObject("Excel.Application")
        Set wb = ActiveWorkbook
        Dim inCheck As Range     ' Input Sheet w/data
        Set inCheck = Range("A7:D15")
        Dim outCheck As Range    ' Output Sheet copy of Input Sheet
        Set outCheck = Range("A1:D9")
    '
    '    Set OutExcel = OutApp.Application
        
        For Each ws In ThisWorkbook.Worksheets
            ws_name = ws.Name
            If ws.Range("E16").Value Like "$" Then
                With Workbooks("File_Out").Worksheets(ws_name)
                    Set outCheck = inCheck
                    ws.Range("E16") = Null
                End With
            Else
            End If
        Next ws
        
        Application.ScreenUpdating = True
        
    End Sub
    I want to read from workbook A, create a new workbook B - then read from A cell(E16) if that is = to a $ then new sheet on B from sheet name on A and copy range(A7:D15) from A to range(A1:D9) of B. Any help would be appreciated
    Last edited by dkub; 05-13-2011 at 02:26 PM. Reason: More Detail / Header Wrong

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