Data copying from WB to WB!

A

aiyer

Hi all!

Thanks a bunch Mudraker for those tips.

Well, here'z exactly what I tried as suggested .

Dim wsData As Worksheet
Set wsData = ActiveSheet
Workbooks.Add
wsData.Copy Before:=ActiveWorkbook.Sheets(1)

But, there were 3 macro buttons that I had created in the origina
workbook and that also is getting copied along with the other data t
the new workbook. But I do NOT need the macro buttons in the ne
workbook, just the data (values in columns and rows) in the ne
workbook.

Is there a way to implement this?
I would appreciate your help.

Thanks again.

Regds,

Arun....
Vtec corp
 
M

mudraker

Sub dddd()
Dim wsData As Worksheet
Set wsData = ActiveSheet
Workbooks.Add

wsData.Cells.Copy

' paste values
ActiveSheet.Cells.PasteSpecial Paste:=xlValues, _
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

'paste format
ActiveSheet.Cells.PasteSpecial Paste:=xlFormats, _
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

ActiveSheet.Range("a1").Select

End Su
 

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