Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
SOLVED

excel vba open

Copper Contributor

What is the difference between open method and opentext  method members of the workbooks object

where the first also opens text files

2 Replies
best response confirmed by adnan2004 (Copper Contributor)
Solution

@adnan2004 

Workbooks.Open does let you open a text file, but you won't have any control over how it opens.

Workbooks,OpenText has a series of arguments that let you specify how to process the text file:

  • Is it delimited or fixed width
  • What is the data type of each column
  • And more.
thanks a lot
1 best response

Accepted Solutions
best response confirmed by adnan2004 (Copper Contributor)
Solution

@adnan2004 

Workbooks.Open does let you open a text file, but you won't have any control over how it opens.

Workbooks,OpenText has a series of arguments that let you specify how to process the text file:

  • Is it delimited or fixed width
  • What is the data type of each column
  • And more.

View solution in original post