run-time error '1004' Cannot open Lotus 1-2-3 file

pevar

New Member
Joined
Jun 30, 2004
Messages
7
I'm trying to import a 1-2-3 file via macro while error msg is appearing.

run-time error '1004' Cannot open Lotus 1-2-3 file

I'm not able to understand what's the error: Do you have any idea on how to solve? :rolleyes:

Txs for help

'File to be opened
Filetoopen = Application.GetOpenFilename("All files(*.*), *.*", , "File")
If Filetoopen = False Then End

Workbooks.Open Filename:=Filetoopen

FileOpened = ActiveWorkbook.Path
n1 = Len(FileOpened)
n2 = Len(Filetoopen)
Filename = Right(Filetoopen, (n2 - n1 - 1))

'clean variable overview
Windows(Filename).Activate
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
If you hit debug when the error pops up, which line does it highlight?
 
Upvote 0
Try changing:
Filetoopen = Application.GetOpenFilename("All files(*.*), *.*", , "File")
to
Filetoopen = Application.GetOpenFilename("All Files,*.*")
 
Upvote 0

Forum statistics

Threads
1,214,617
Messages
6,120,541
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top