Export "selected cells" to a TXT file.

  • Thread starter Thread starter brunces
  • Start date Start date
B

brunces

Hello, fellas.

Please, does anybody know how to create a macro to export (save
whatever) only "selected cells" (or only one sheet) to a "TXT" file
:)

I mean... The macro would have 2 steps:

1st - Select A1:D40
2nd - Open the "Export to" dialog box, with the "Save as type" optio
already pointed to "Text (Separated by tabs)".

Is that possible? :)

---

One more doubt...

Is there any way to change an icon of a single MS Excel file, using VB
or any other way to do it?

I've got this little project wich I created in MS Excel and that woul
be very cool if I could change its icon, just as it was a real littl
software, and not a simple MS Excel file. :)

Well, thanks for the attention. Hugs for all. :)

Bruno
 
Dim sh as Worksheet
set sh = activeSheet
workbooks.Add
sh.Range("A1:D40").copy Destination:=Activesheet.Range("A1")
Application.DisplayAlerts = False
activeworkbook.SaveAs filename:=sh.Name & ".xls", FileFormat:=xlText
Activeworkbook.Close SaveChanges:=False
Application.DisplayAlerts = True


for a sheet

Dim sh as Worksheet
set sh = activeSheet
sh.copy
Application.DisplayAlerts = False
activeworkbook.SaveAs filename:=sh.Name & ".xls", FileFormat:=xlText
Activeworkbook.Close SaveChanges:=False
Application.DisplayAlerts = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top