How can I save a single Sheet with range not the workbook?

H

HomeyDaClown

I've been playing around for some time and just can not figure out how to save a single sheet with a range of A1:I6 to a file. Is it even possable?

Here is what I've used so far. It works great if I needed the entire woorkbook. I'm a real newbie so I don't know what to look for.

Public Sub SaveAsA1()
Dim Location, ThisFile As String, ThisSheet As String

ThisFile = Sheets("Save").Range("A1:I6").Select
If ThisFile = "" Then Exit Sub
ThisFile = Location + ThisSheet
ActiveSheet.SaveAs Filename:="C:\Excel\A1\A1-" & Format(Time, "hh-mm") & " " & Format(Date, "dd-mm-yyyy")

End Sub
 
D

Don Guillett

See if this works

Sub saverange_new()
Sheets("Sheet3").Range("a2:d12").Copy
Workbooks.Add
ActiveSheet.Paste
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
HomeyDaClown said:
I've been playing around for some time and just can not figure out how to
save a single sheet with a range of A1:I6 to a file. Is it even possable?
Here is what I've used so far. It works great if I needed the entire
woorkbook. I'm a real newbie so I don't know what to look for.
 
H

HomeyDaClown

Sub saverange_new()
Sheets("Sheet3").Range("a2:d12").Copy
Workbooks.Add
ActiveSheet.Paste
End Sub

Thanks Don, How can I add a name and path to be saved to
it?
Thanks again,
Homey
 
X

xlbo

If that is all there is on the sheet then:
Sheets("Save").copy
Activeworkbook.saveas "Full Path & Name Go Here"

or if you need todo the copy / paste then

set newBk = workbooks.add
thisworkbook.sheets("Save").range("A1:I6").copy destination:=newBk.sheets(1).range("A1")
newBk.saveas "Full Name & Path Go Here")
 

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

Top