Path not found, but the folders do exist
[code] Sub toPDF() ' This will copy a specified range('s) from ws1 & ws2 to ws3. ' Now you can...
I believe the problem is that you are not getting the sFileName from the original workbook. So I have added ActiveWorkbook.Save...
Hello Ready2go This may only answer some of your question. The macro below will create a PDF file of Sheet2....
Dear Hyside2, I really appreciate your cooperation and helpful answer. Thanks so much.
Try this instead =IFERROR(LEFT(B1,FIND(" ",B1)-1),B1) [img alt_text='' description='']http://vbaf1.com/q/wp-content/uploads/2018/08/givenname.png[/img]
I am not sure if this is what you are looking for but test it out anyway. [img alt_text='' description='']http://vbaf1.com/q/wp-content/uploads/2018/08/1-2.png[/img]...
Oh! Please try this. You will need to change "Book1" on the line that reads (oFilename="Book1") to the name of...
I have 2 workbooks in a location C:\new\folder. I want sheet 1 from wb1, sheet3 from wb2 and place it one after the other in another existing workbook wb3 in the same location when i click a button in wb3. can you help me with a code?
New folder (if folder doesn’t exist) is created at the same place with workbook.
The workbook’s sheets as new workbooks are copied in this folder.
Dim Sheet As Worksheet, SheetName$, MyFilePath$, N&
Application.ScreenUpdating = False
MyFilePath$ = ActiveWorkbook.Path & "\" & _
Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4)
.ScreenUpdating = False
.DisplayAlerts = False
On Error Resume Next
For N = 1 To Sheets.Count
SheetName = ActiveSheet.Name
.Name = SheetName
.SaveAs Filename:=MyFilePath _
& "\" & SheetName & ".xls"
.CutCopyMode = False
Application.ScreenUpdating = True
MsgBox "The Process Was Carried Out Successfully", vbInformation
Working Template Can Be Downloaded Here
Hi, Here is the VBA code to copy worksheets from Book1.xlsx and Book2.xlsx into target Workbook. Please create a module in your target workbook and create button to assign the below code:
Dim wb1 As Workbook
'Get1 sheet1 from Book1.xlsx
Set wb1 = Workbooks.Open(ThisWorkbook.Path & "\Book1.xlsx")
Set wb1 = Nothing
'Get1 sheet1 from Book2.xlsx
Set wb1 = Workbooks.Open(ThisWorkbook.Path & "\Book2.xlsx")
Set wb1 = Nothing
'You can save
Hope this helps-PNRao!
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).