![]() |
Copy cells from work book then auto close without losing data
I am trying to prepare a Workbook for people who don't use excel much. I
need it to open a CSV file, manipulate the data, copy cells and then close the file before pasting without user input. So Far I can open the file, manipulate the data, copy the data and close the file using "ActiveWorkbook.Close SaveChanges:=False" But I don't know how to bypass the popup asking if I want to keep the data on the clipboard. Thanks in Advance |
Copy cells from work book then auto close without losing data
Hi Bigg,
Try replacing: ActiveWorkbook.Close SaveChanges:=False with Application.CutCopyMode = False ActiveWorkbook.Close SaveChanges:=False --- Regards, Norman "Bigg19" wrote in message ... I am trying to prepare a Workbook for people who don't use excel much. I need it to open a CSV file, manipulate the data, copy cells and then close the file before pasting without user input. So Far I can open the file, manipulate the data, copy the data and close the file using "ActiveWorkbook.Close SaveChanges:=False" But I don't know how to bypass the popup asking if I want to keep the data on the clipboard. Thanks in Advance |
Copy cells from work book then auto close without losing data
Thanks
I tried it earlier, bit it removes the data from the clipbpoard, and I need to save it for future pasting. Bigg19 "Norman Jones" wrote: Hi Bigg, Try replacing: ActiveWorkbook.Close SaveChanges:=False with Application.CutCopyMode = False ActiveWorkbook.Close SaveChanges:=False --- Regards, Norman "Bigg19" wrote in message ... I am trying to prepare a Workbook for people who don't use excel much. I need it to open a CSV file, manipulate the data, copy cells and then close the file before pasting without user input. So Far I can open the file, manipulate the data, copy the data and close the file using "ActiveWorkbook.Close SaveChanges:=False" But I don't know how to bypass the popup asking if I want to keep the data on the clipboard. Thanks in Advance |
Copy cells from work book then auto close without losing data
Hi Bigg,
'---------------- I tried it earlier, bit it removes the data from the clipbpoard, and I need to save it for future pasting. '---------------- Try: Application.DisplayAlerts = False ThisWorkbook.Close SaveChanges:=False Application.DisplayAlerts = True --- Regards, Norman |
Copy cells from work book then auto close without losing data
Application.displayalerts=false
'...code Application.displayalerts=true However, I would normally copy/paste, then continue with other code, rather than expecting clipboard data to remain unchanged over time. NickHK "Bigg19" wrote in message ... Thanks I tried it earlier, bit it removes the data from the clipbpoard, and I need to save it for future pasting. Bigg19 "Norman Jones" wrote: Hi Bigg, Try replacing: ActiveWorkbook.Close SaveChanges:=False with Application.CutCopyMode = False ActiveWorkbook.Close SaveChanges:=False --- Regards, Norman "Bigg19" wrote in message ... I am trying to prepare a Workbook for people who don't use excel much. I need it to open a CSV file, manipulate the data, copy cells and then close the file before pasting without user input. So Far I can open the file, manipulate the data, copy the data and close the file using "ActiveWorkbook.Close SaveChanges:=False" But I don't know how to bypass the popup asking if I want to keep the data on the clipboard. Thanks in Advance |
Copy cells from work book then auto close without losing data
Thanks
Your solution Worked Regards Bigg19 "NickHK" wrote: Application.displayalerts=false '...code Application.displayalerts=true However, I would normally copy/paste, then continue with other code, rather than expecting clipboard data to remain unchanged over time. NickHK "Bigg19" wrote in message ... Thanks I tried it earlier, bit it removes the data from the clipbpoard, and I need to save it for future pasting. Bigg19 "Norman Jones" wrote: Hi Bigg, Try replacing: ActiveWorkbook.Close SaveChanges:=False with Application.CutCopyMode = False ActiveWorkbook.Close SaveChanges:=False --- Regards, Norman "Bigg19" wrote in message ... I am trying to prepare a Workbook for people who don't use excel much. I need it to open a CSV file, manipulate the data, copy cells and then close the file before pasting without user input. So Far I can open the file, manipulate the data, copy the data and close the file using "ActiveWorkbook.Close SaveChanges:=False" But I don't know how to bypass the popup asking if I want to keep the data on the clipboard. Thanks in Advance |
Copy cells from work book then auto close without losing data
Thanks
That did the trick, only I had to use ActiveWorkbook.Savechanges= False. When I tried ThisWorkbook.Savechanges = False, it closed my destination workbook (from which the macro was being run) Bigg19 "Norman Jones" wrote: Hi Bigg, '---------------- I tried it earlier, bit it removes the data from the clipbpoard, and I need to save it for future pasting. '---------------- Try: Application.DisplayAlerts = False ThisWorkbook.Close SaveChanges:=False Application.DisplayAlerts = True --- Regards, Norman |
All times are GMT +1. The time now is 08:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com