Saving Excel document without macros

  • Thread starter Thread starter Rui Álvares
  • Start date Start date
R

Rui Álvares

Hi,

I have a document that runs periodically a macro to treat data that a
collect from an external device.
I want to save this new data in a woorkbook withou the macro.
How can I do that?

Thanks in advance

Rui
 
Hi Rui,

If the data is held in one worksheet "Data" (say) and the VBA code is in a
standard module, then

Sub CodelessWorkbook()

'Create a new singlesheet workbook
ThisWorkbook.Sheets("Data").Copy

'Save and name the new workbook
ActiveWorkbook.SaveAs "NewFileName"

End Sub

Change Data to your sheet name.
 

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