Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Open a XLS from a Module

Hi,
i need to open a xls file (located in the same
folder),from another xls file.
And, once i the file is open, how can i refer to the cells?

Thank you
regards
Giorgio
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open a XLS from a Module

Giorgio wrote:
*Hi,
i need to open a xls file (located in the same
folder),from another xls file.
And, once i the file is open, how can i refer to the cells?

Thank you
regards
Giorgio *



Hello Giorgio, like this.


Code:
--------------------


Dim wb As Workbook
Set wb = _
Workbooks.Open(ThisWorkbook.Path & _
Application.PathSeparator & _
"YourBookName.xls") 'Change here to your Wkb name.
With wb
.Sheets("Sheet1").Cells(1, 1).Value = "Test"
End With


--------------------
;)


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Open a XLS from a Module

Thankyou very much!
It works!
:)


-----Original Message-----
Giorgio wrote:
*Hi,
i need to open a xls file (located in the same
folder),from another xls file.
And, once i the file is open, how can i refer to the

cells?

Thank you
regards
Giorgio *



Hello Giorgio, like this.


Code:
--------------------


Dim wb As Workbook
Set wb = _
Workbooks.Open(ThisWorkbook.Path & _
Application.PathSeparator & _
"YourBookName.xls") 'Change here to your Wkb name.
With wb
.Sheets("Sheet1").Cells(1, 1).Value = "Test"
End With


--------------------
;)


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Open a XLS from a Module

Put Workbooks.Open in your code and double click on Open
press F1 read the help and view the example.

Put Application.ActiveWorkbook.Cells(row, column).Value in
your code and double click on Cells press F1 read the help
and view the example.

regards
KM

-----Original Message-----
Hi,
i need to open a xls file (located in the same
folder),from another xls file.
And, once i the file is open, how can i refer to the

cells?

Thank you
regards
Giorgio
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When i open excel, i i get: Compile error in hidden Module, HELP! Snoopy Excel Discussion (Misc queries) 1 February 19th 09 03:07 PM
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
Module not file when open the excel file Thomas Excel Discussion (Misc queries) 1 July 14th 07 02:48 PM
code in module A to not execute a Worksheet_SelectionChange sub of another module Jack Sons Excel Discussion (Misc queries) 4 December 11th 05 11:52 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"