ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   gathering info & importing to another worksheet (https://www.excelbanter.com/excel-programming/437494-gathering-info-importing-another-worksheet.html)

kennyhotboi

gathering info & importing to another worksheet
 
i am trying to track my servers sales per hour and am needing to organize my
data from the week by their server numbers, sum each servers sales for the
week, and pull all of this data from a separate workBOOK. i can do the rest
of the formulas and set up myself, but the prior poses a problem for me...
can anyone help?

thanks!

Phil Hibbs

gathering info & importing to another worksheet
 

Dim oExcel As Excel.Application
Dim oWorkbook As Workbook
Dim oWorksheet As Worksheet

Set oExcel = New Excel.Application
Set oWorkbook = oExcel.Workbooks.Open(FileName:="C:\WorkbookName.x ls",
_
UpdateLinks:=0, _
IgnoreReadOnlyRecommended:=True)
Set oWorksheet = oWorkbook.Sheets("SheetName")

' update oWorksheet

oWorkbook.Close (SaveChanges:=True)
oExcel.Quit

Phil Hibbs.
--


All times are GMT +1. The time now is 05:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com