Change code to copy and paste special

Ingolf

Banned
Joined
Mar 20, 2011
Messages
809
Hello,

I come back I need little help.
Can anyone help me to change this code:

Set FSO = CreateObject("Scripting.FileSystemObject")
With FSO
If Not .FolderExists(ThisWorkbook.Path & "\" & wks.Range("A2").Text) Then
.CreateFolder (ThisWorkbook.Path & "\" & wks.Range("A2").Text)
Set wb = Workbooks.Add (xlWBATWorksheet)
wb.SaveAs ThisWorkbook.Path & "\" & wks.Range("A2").Text & "\" & wks.Range("B2").Text
wks.Range("E1:AZ50").Copy wb.Worksheets(1).Range("A2")
wb.Close True
End If
End With

Now this code copy range E1:AZ50 from the sheet where I run the code, in file named from cell B2 and I need to copy and paste special that range (I don't need formula but I need to copy all formated cell from that range). Thank you.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,586
Messages
6,179,712
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top