How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Michael Hannigan Your Own Question

Michael Hannigan
Michael Hannigan, Office Specialist
Category: Microsoft Office
Satisfied Customers: 11356
Experience:  25+ Years Experience in Computers and Electronics. Microsoft Certified MCSE, MCDBA, MCP, Microsoft Partner
23511658
Type Your Microsoft Office Question Here...
Michael Hannigan is online now
A new question is answered every 9 seconds

I have a excel program that has 1 sheet give the info for another

This answer was rated:

I have a excel program that has 1 sheet give the info for another sheet, then I run a macro that saves each sheet separately in a different folder the problem I am having is when the sheet gets saved it does not keep any of the info that was filled out from the first sheet, I used if statements to fill out the cells in the second sheet, this is my macro for the saving and restarting my project. I think it will be easier for someone to understand or fix the problem with the file and macro so I can upload it if needed just let me know

Sub Saveandstartover()
'
' Saveandstartover Macro
'

' saves poreqform with the file name taken from cell k69
Sheets("POREQFORM").Select
Sheets("POREQFORM").Copy
thisfile = Range("k69").Value
ActiveWorkbook.SaveAs Filename:="D:\new sws folder\maintenance\poreq\" & thisfile
ActiveWorkbook.Close

' saves vehicle repair order with the file name taken from cell r54
Sheets("vehicle repair order").Select
Sheets("vehicle repair order").Copy
thisfile = Range("r54").Value
ActiveWorkbook.SaveAs Filename:="D:\new sws folder\maintenance\roreq\" & thisfile
ActiveWorkbook.Close
' Clears the old POreqform
Sheets("POREQFORM").Select
Range("L1:P1").Select
Selection.ClearContents
Range("L5:P5").Select
Selection.ClearContents
Range("D7:I8").Select
Selection.ClearContents
Range("B16:E17").Select
Selection.ClearContents
Range("F16:J17").Select
Selection.ClearContents
Range("K16:O17").Select
Selection.ClearContents
Range("B20:N47").Select
Selection.ClearContents
Range("F49:H49").Select
Selection.ClearContents
Range("F50:H50").Select
Selection.ClearContents
Range("K50:L50").Select
Selection.ClearContents
Range("K49").Select
Sheets("Vehicle Repair Order").Select
Range("AS22:AT47").Select
Selection.ClearContents
Range("C8:G8").Select
Selection.ClearContents
Range("C14:G14").Select
Selection.ClearContents
Range("C36:G36").Select
Selection.ClearContents
Range("C49:G50").Select
Sheets("POREQFORM").Select
Range("F50:H50").Select

End Sub


Hello and thank you for your question today. My name is Jason. I look forward to helping you today.

Please, let me see the document that you are having this problem with.

Please, be forewarned that the site is not secure:
- Click the following link: http://www.wikisend.com
- Upload the file to that website
- Once it is uploaded, the resulting page will display a "File ID" number.
- Please, give me that "File ID Number"

Customer: replied 3 years ago.

http://wikisend.com/download/779280/Orl Mechanics Work.xlsm


 


Orl Mechanics Work.xlsm


 


the macro is called saveandstartover


 


 


Please, elaborate on what part of the macro is not working.

I ran it and it seems to work.
Customer: replied 3 years ago.


the file that saves as the RO file is empty the name is XXXXX XXXXX any info that I put in it does not stay with it


 


the poreq puts the same info on the roreq then they get split up, if you fill in the vendor, date, equip # XXXXX equip mileage on the poreqform it should be placed on the ro form

Thank you for the update.

Please, send me a copy of the document that has data in the places you wish to have data.

Customer: replied 3 years ago.

http://wikisend.com/download/324662/Orl1 Mechanics Work.xlsm


 


Orl1 Mechanics Work.xlsm


 


as soon as you run the macro the last steps are to clear all these contents but if you go into the po file it created you can get the info back from there

Customer: replied 3 years ago.


If its a fix of using a different formula to input the cells on the vehicle repair order form instead of the if statement tell me how to word it or give me a example and I can type it all in " the if statement was the only way I new to get the values I needed"

Thank you for much for your patience.

How does this look? http://wikisend.com/download/128772/Fixed.xlsm

Customer: replied 3 years ago.


The PO side is still working good but the RO is only supposed to save that one sheet not the whole workbook, I have to email that file to corporate and they only want the one sheet

Customer: replied 3 years ago.


I tried running it again and when I hit the button on the bottom of the page it still does the same thing it saves the sheet only but all the info on it is missing

Customer: replied 3 years ago.


from what it looks like to me is when the page is created originally it is linked with the po req page but when they get split up and saved the link is broke and none of the values stay with the sheet so we need to figure out how to save those fields as text instead of results from a formula so no link is needed?


 


I'm guessing but does that sound close?


Thank you Ken.

Here is one that works for sure: http://wikisend.com/download/893784/Fixed Again.xlsm

Please, let me know how that looks.
Customer: replied 3 years ago.

nope


it still don't keep any of the info it saves it by the name correctly but like before it will not keep the info on the separately saved ro sheet


Sorry to be a pain I know this is a hard one I have been trying different thing for a week that's why I had to call on the pro's



Here it is: http://wikisend.com/download/615538/Last One.xlsm

For some reason, the wrong macro was assigned to the button.
Customer: replied 3 years ago.

It works except the new saved ro file is missing the logo in the top left corner and can we have only one sheet we don't need sheet 2 or 3 showing

Customer: replied 3 years ago.

Are you still there?

I have run out of ideas.

For this reason, I am opting out of the question and allowing another expert the chance to help.

I wish you luck,
- Jason
Customer: replied 3 years ago.


Sorry to hear that you were so close I thought you had it, well thanks for trying I really appreciate it

Hello again. It's Mike. I saw that your previous Expert left the conversation. I have the change here that will copy the logo. As far as the other worksheets to which you refer, I don't see any additional worksheets once the macro completes.

 

Here's the change:

' saves poreqform with the file name taken from cell k69
Sheets("POREQFORM").Select
Sheets("POREQFORM").Copy
thisfile = Range("k69").Value
ActiveSheet.Shapes.Range(Array("Picture 4")).Select
Selection.Copy

ActiveWorkbook.SaveAs Filename:="D:\new sws folder\maintenance\poreq\" & thisfile
ActiveWorkbook.Close


Sheets("Vehicle Repair Order").Select
Set ws = ActiveSheet
Set wb = Workbooks.Add
ActiveSheet.Paste
ws.Cells.Copy
ActiveSheet.Cells.PasteSpecial Paste:=xlValues
ActiveSheet.Cells.PasteSpecial Paste:=xlFormats

Customer: replied 3 years ago.


Its almost there


The logo needs to be over 3 cells to the right and 2 cells down also the file that is saved is to large it needs to be 1 page this one prints as 4

I was having a problem - the macro didn't seem to be working as you described that you needed it to.

As for the four pages - that's because the original sheet is formatted that way - you'll have to change it there. Here's a workbook with an updated macro.

New Excel File
Michael Hannigan, Office Specialist
Category: Microsoft Office
Satisfied Customers: 11356
Experience: 25+ Years Experience in Computers and Electronics. Microsoft Certified MCSE, MCDBA, MCP, Microsoft Partner
Michael Hannigan and 3 other Microsoft Office Specialists are ready to help you
Customer: replied 3 years ago.


It wouldn't let me download the file I tried to open as a excel sheet and its asking for a id and password


 


while waiting I started over and was able to get it to do what I wanted but the macro is huge im sure I didn't do it the most efficient way and really would like to see the way you did it (This is how im learning).


I have 1 more question posted could you help with this one also its almost like the last one you did except for printing the file it needs to be saved in another location


I hope im not to much trouble I am a novice at this but learning more each day


Thanks