File Re-open

taha54

Board Regular
Joined
Aug 11, 2006
Messages
103
hi all, i have a file lets call temp.xls , i used a VBA cde to do an operation on that file and save it in the same directory as a unicode txt file,

Code:
sub code()
operations

fname = ActiveWorkbook.Name

If Mid(fname, Len(fname) - 3, 1) = "." Then fname = Left(fname, Len(fname) - 4)
locat = "C:\Documents and Settings\Administrator\Desktop\E2A\" & fname & ".txt"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=locat, FileFormat:=xlUnicodeText
Application.DisplayAlerts = True
ActiveWorkbook.Close (False)

how can i re open my excel file whih is in the same directory to perform one more step in VBA on that txt file

thank you

EDIT: Added Code tags - Smitty
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,214,827
Messages
6,121,806
Members
449,048
Latest member
greyangel23

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