How to make new, blank

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've created a VBA project that automatically displays a form to collect user
input that are then sent to a single contact who manages all these records.

The problem is that I send the admin a form that ALSO contains the form (all
the VBA modules).

How do I create a "blank" spreadsheet that has "just the data" and none of
the macros?
 
Hi,
The following code my work. You need to change "Sheet1" to the worksheet you
want to send.
You can enter a subject and Message. Enter the E-mail address. If you have
virus protection you may get a popup. Test before you use.

Charles

Sub sendMymail()
Sheets("Sheet1").Select '''creates the work sheet to be sent
Sheets("Sheet1").Copy
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Delivery = xlOneAfterAnother
.Subject = " Your Subject"
.Message = "Your Message if any"
.Recipients = "Your E-Mail address"
.ReturnWhenDone = False
ActiveWorkbook.Route
End With
ActiveWorkbook.Saved = True
ActiveWindow.Close
End Sub
 

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