Saving Excel workbook to a text file

Davis10

New Member
Joined
Jun 21, 2011
Messages
27
I am using a command button to save my excel workbook to a txt file. So far the code I have tried does not work. What sequence of code should I write to get the work book saved?

Thank you.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Code generated via macro recorder:

Code:
ActiveWorkbook.SaveAs Filename:= "[URL="file://\\ukhbeudata01\marketing\PersMktg\Balance"]C:\MyDocuments[/URL]\Book10.txt" , FileFormat:=xlText, CreateBackup:=False
 
Upvote 0
I tried this, however it does not work and I get an error that says "Text cannot be accessed. The file may be corrupted, located on a server that is not responding, or read only. Any other ideas?
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,242
Members
452,898
Latest member
Capolavoro009

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