Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Copy - Paste

Another question relating to the import of some data from
another book.

After I have copied the data from the sheet I get the
messgage 'There is a large amount of data on the
Clipboard - Do you want to make this available to other
programs?

Is is possible for excel not to display this message.

I have tried application.screenupdating = false but this
is not working

Sub Import_Data()
'Imports data from Fname - Sheet (Test11) to Crystal_Table
Application.ScreenUpdating = False
If fname < "" Then
Range("a1").Value = fname
Set oWb = Workbooks.Open(fname)
oWb.Sheets("TEST11").Range("A1:AQ100").Copy
Windows("IMPORT.xls").Activate
Sheets("Crystal_Table").Select
ActiveSheet.Paste
Else
MsgBox ("Please select a Valid File")
End If
oWb.Close
Worksheets("Menu").Activate
Application.ScreenUpdating = True
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy - Paste

After the past line add this Edgar
It will clear the clipboard

Application.CutCopyMode = False


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Edgar Thoemmes" wrote in message ...
Another question relating to the import of some data from
another book.

After I have copied the data from the sheet I get the
messgage 'There is a large amount of data on the
Clipboard - Do you want to make this available to other
programs?

Is is possible for excel not to display this message.

I have tried application.screenupdating = false but this
is not working

Sub Import_Data()
'Imports data from Fname - Sheet (Test11) to Crystal_Table
Application.ScreenUpdating = False
If fname < "" Then
Range("a1").Value = fname
Set oWb = Workbooks.Open(fname)
oWb.Sheets("TEST11").Range("A1:AQ100").Copy
Windows("IMPORT.xls").Activate
Sheets("Crystal_Table").Select
ActiveSheet.Paste
Else
MsgBox ("Please select a Valid File")
End If
oWb.Close
Worksheets("Menu").Activate
Application.ScreenUpdating = True
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copy - Paste

Edgar,

Have you tried

Application.CutCopyMode = False

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Edgar Thoemmes" wrote in message
...
Another question relating to the import of some data from
another book.

After I have copied the data from the sheet I get the
messgage 'There is a large amount of data on the
Clipboard - Do you want to make this available to other
programs?

Is is possible for excel not to display this message.

I have tried application.screenupdating = false but this
is not working

Sub Import_Data()
'Imports data from Fname - Sheet (Test11) to Crystal_Table
Application.ScreenUpdating = False
If fname < "" Then
Range("a1").Value = fname
Set oWb = Workbooks.Open(fname)
oWb.Sheets("TEST11").Range("A1:AQ100").Copy
Windows("IMPORT.xls").Activate
Sheets("Crystal_Table").Select
ActiveSheet.Paste
Else
MsgBox ("Please select a Valid File")
End If
oWb.Close
Worksheets("Menu").Activate
Application.ScreenUpdating = True
End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Copy - Paste

Edgar Thoemmes wrote:

Another question relating to the import of some data from
another book.

After I have copied the data from the sheet I get the
messgage 'There is a large amount of data on the
Clipboard - Do you want to make this available to other
programs?

Is is possible for excel not to display this message.

I have tried application.screenupdating = false but this
is not working


What you need is Application.DisplayAlerts = False, then set it back to
true.

I'm not sure waht will be the behaviour if the messagebox is skipped so
you'll have to try it out.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy - Paste

Excel uses interrupts to send warning meaasages like the
one you mentioned. The EnableEvents command enables or
disables these interrups. This is also used to suppress
the "Do you want to replace this file" message when saving
an existing file in VBA. Try using this:

Application.EnableEvents = False ' turns interrupts OFF
..
[your code]
..
Application.EnableEvents = True ' turns interrupts back
ON

Be sure to set to reenable Events after executing your
code but before you leave the procedure or else you will
not receive any warning messages during the rest of your
Excel session.

Charlie

-----Original Message-----
Another question relating to the import of some data from
another book.

After I have copied the data from the sheet I get the
messgage 'There is a large amount of data on the
Clipboard - Do you want to make this available to other
programs?

Is is possible for excel not to display this message.

I have tried application.screenupdating = false but this
is not working

Sub Import_Data()
'Imports data from Fname - Sheet (Test11) to Crystal_Table
Application.ScreenUpdating = False
If fname < "" Then
Range("a1").Value = fname
Set oWb = Workbooks.Open(fname)
oWb.Sheets("TEST11").Range("A1:AQ100").Copy
Windows("IMPORT.xls").Activate
Sheets("Crystal_Table").Select
ActiveSheet.Paste
Else
MsgBox ("Please select a Valid File")
End If
oWb.Close
Worksheets("Menu").Activate
Application.ScreenUpdating = True
End Sub
.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copy - Paste

I think you've got the wrong end of the stick here.

Read this site to get a proper understanding of events
http://www.cpearson.com/excel/events.htm

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"cgaynor" wrote in message
...
Excel uses interrupts to send warning meaasages like the
one you mentioned. The EnableEvents command enables or
disables these interrups. This is also used to suppress
the "Do you want to replace this file" message when saving
an existing file in VBA. Try using this:

Application.EnableEvents = False ' turns interrupts OFF
.
[your code]
.
Application.EnableEvents = True ' turns interrupts back
ON

Be sure to set to reenable Events after executing your
code but before you leave the procedure or else you will
not receive any warning messages during the rest of your
Excel session.

Charlie



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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy, paste without file name referenced after paste AusTexRich Excel Discussion (Misc queries) 6 September 23rd 08 02:57 AM
Copy; Paste; Paste Special are disabled Mack Neff[_3_] Excel Discussion (Misc queries) 0 April 28th 08 06:29 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
I cannot paste from one workbook to another. Copy works, paste do. JimmyMc Excel Discussion (Misc queries) 1 June 10th 05 03:54 PM


All times are GMT +1. The time now is 11:31 AM.

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

About Us

"It's about Microsoft Excel"