Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy workbook files without losing data that was in the org. work rue Excel Worksheet Functions 0 October 24th 06 09:57 PM
Open book, copy and paste from sheet, and then close.... Darin Kramer Excel Programming 5 September 14th 06 04:00 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
Copy and paste ranges from a close book using Validation stakar[_19_] Excel Programming 0 June 24th 04 02:37 PM
close work book via macro Sunil Patel Excel Programming 3 January 7th 04 09:56 PM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"