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 does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,249
Office Version
  1. 365
Platform
  1. Windows
If you hit debug when the error pops up, which line does it highlight?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
58,249
Office Version
  1. 365
Platform
  1. Windows
Try changing:
Filetoopen = Application.GetOpenFilename("All files(*.*), *.*", , "File")
to
Filetoopen = Application.GetOpenFilename("All Files,*.*")
 

Forum statistics

Threads
1,136,263
Messages
5,674,710
Members
419,521
Latest member
Jasonnie

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
Top