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 am in need of vba code for excel 2007 wherein the excel sheet whenever is save then before saving it should check that in “E1″ i.e. the range “E1″ <> 0 then only the file should save that is the excel sheet should be save only if the E1 contain “0”. Otherewise a dialog box should appear with a msg that the “TRIAL BALANCE NOT TALLY” hence the file cannot be saved.
Here is the VBA Macro to allow the file to Save if Range(“E1″) is 0, other wise it will not save and trigger the message.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Sheets("YourE1RangeSheet").Range("E1").Value <> 0 Then
MsgBox "TRIAL BALANCE NOT TALLY", vbInformation, "Please Check"
Cancel = True
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).