• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Coding for Macro

sandip

New Member
Hi,


I want macro to create new workbook with specify name and take specify range data from main workbook. so please help me for same.


Regard's
Sandip Sable.
 
Even if I would, I could'nt 'cause I'm not a brain scanner to devine your exact needs !​
So you should do it on your own by using the macro recorder …​
 
Hi Sandip,

Welcome Onboard..

You can use the below....But I recommend you go thru some tutorials to have enough knowledge of VBA prior to working on VBA..
Code:
varfile = ActiveWorkbook.FullName
pth = Mid(varfile, 1, InStrRev(varfile, "\", Len(varfile), vbTextCompare) - 1) & "\"
Workbooks.Add
ActiveWorkbook.SaveAs pth & "1234.xls"

Moreover, to copy the range you need to mention what you want to copy and where you want it to be pasted,etc...:)
 
Back
Top