Be the first user to complete this post
|
Add to List |
VBA-Excel: Open a Excel WorkBook
Using VBA (Visual Basic for Applications) , you can open Excel workbook at the runtime by using Open() method.
You have to provide the Complete Path along with the name of the Excel you want to open, it will return the object of that excel which you can use later to perform operations on it.
Function FnOpenWorkBook() Dim objWorkBook As Workbook Set objWorkBook = Workbooks.Open("C:\New folder\NewOpenBook.xlsx") objWorkBook.Sheets("Sheet1").Range("A1").Value = 5 End Function
Also Read:
- VBA-Excel: Modified Consolidator – Merge or Combine Multiple Excel Files Into One Where Columns Are Not In Order
- Excel-VBA : Insert Multiple Images from a Folder to Excel Cells
- VBA-Excel: Delete Blank Rows from Excel Work Sheet
- Excel-VBA : Prevent Changing the WorkSheet Name
- VBA-Excel: Convert Numbers (Rupees) into Words OR Text - Updated Till 1000000 Crore With Decimal Numbers