Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Normal open file statement in VBA

I´m trying to open a file but it´s not working.

Workbook.Open C:\users\me\desktop\testfile.txt

I always get the error message: Run-time error '424': Object required

I just want to open a file. It´s not fixed if the file will be a exel, a txt, jpg or word file.

Should be as simple as possible.

like image 915
Julius Avatar asked Oct 18 '25 05:10

Julius


1 Answers

To open a word, excel, jpg, pdf or any file, simple use:

Application.FollowHyperlink "path to file name"
like image 87
Albert D. Kallal Avatar answered Oct 20 '25 00:10

Albert D. Kallal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!