Results 1 to 6 of 6

Thread: Opening and extracting data from another workbook

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    snb
    Guest
    Sub M_snb()
      With Application.FileDialog(3)
         If .Show Then
            With GetObject(.SelectedItems(1))
              With .Sheets(1)
                 sn = Array(.Cells(12, 2), Cells(11, 8), .Cells(16, 4), .Cells(7, 44), .Cells(77, 4), .Cells(77, 5), .Cells(77, 6))
              end with
              .Close 0
            End With
         End If
       End With
       
       c00 = Join([transpose(char(65 + row(1:25)))], "")
       Do
         y = InputBox("column", "Column letter", "A")
       Loop Until InStr(c00, y)
       
       ActiveSheet.Cells(6, InStr(c00, y)).Resize(4) = Application.Transpose(Array(sn(0), sn(1), sn(2), sn(3)))
       ActiveSheet.Cells(23, InStr(c00, y)).Resize(3) = Application.Transpose(Array(sn(4, sn(5), sn(6))))
    End Sub
    Last edited by snb; 04-18-2024 at 07:14 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •