|
-
October 15th, 2004, 04:23 AM
#1
Reading Excel sheet from a Folder
Hi,
I can read an Excel file from the following code,however I am not sure where i am going to provide the path of sheet located in a folder.
Can somebody help?I am new to VB.
Public OD As Double, OD1 As Double, BWG As Double, BWG1 As Double, Pr As Double, K1 As Double
Public irow As Integer, icol As Integer
Sub Corr_Factor()
Dim objXL As Excel.Application
Dim objSHEET As Excel.Worksheet
Dim objWBOOK As Excel.Workbook
Set objXL = ActiveWorkbook.Excel4IntlMacroSheets.Application
'--Point to Data Sheet--
Set objSHEET = objXL.Sheets("Corr Factor K1")
objXL.Sheets("Corr Factor K1").Select
OD = objXL.ActiveSheet.Cells(55, 2).Value
BWG = objXL.ActiveSheet.Cells(56, 2).Value
Pr = objXL.ActiveSheet.Cells(57, 2).Value
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|