Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Paste w/ No User Input

I can across your website detailing Excel automation in Delphi and
found it VERY useful. However, my current project requires a task that
isn't mentioned there or has been covered in the Delphi/Microsoft
newsgroups, yet. If you could spare me a few minutes and take a look
at my problem, I'd be most grateful.

Hello,
I'm copying data that is variable length from the clipboard into a
worksheet. I've figured out to this programatically with one slight
problem. After using ws.Paste, Excel pops up the following MessageBox:

"Data on the clipboard is not the same size and shape of the selected
area. Do you want to paste the data anyway?"

Once I click the OK button the data is pasted, but I'm trying to
hide the Excel interface and need to automate this entire task with no
user input. Is there a way to prevent this message?

I've already tried to send TExcelApplication a RETURN key press
using SendKeys after I paste, but it never gets called because program
execution is waiting for the the ws.Paste function to finish. Any
ideas?

Rich Walls

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Excel Paste w/ No User Input

Have you tried:

Application.DisplayAlerts = False
Your code here

Application.DisplayAlerts = True

"Rich" wrote in message
ups.com...
I can across your website detailing Excel automation in Delphi and
found it VERY useful. However, my current project requires a task that
isn't mentioned there or has been covered in the Delphi/Microsoft
newsgroups, yet. If you could spare me a few minutes and take a look
at my problem, I'd be most grateful.

Hello,
I'm copying data that is variable length from the clipboard into a
worksheet. I've figured out to this programatically with one slight
problem. After using ws.Paste, Excel pops up the following MessageBox:

"Data on the clipboard is not the same size and shape of the selected
area. Do you want to paste the data anyway?"

Once I click the OK button the data is pasted, but I'm trying to
hide the Excel interface and need to automate this entire task with no
user input. Is there a way to prevent this message?

I've already tried to send TExcelApplication a RETURN key press
using SendKeys after I paste, but it never gets called because program
execution is waiting for the the ws.Paste function to finish. Any
ideas?

Rich Walls



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel Paste w/ No User Input

That works...quick response appreciated.

Rich

JON JON wrote:
Have you tried:

Application.DisplayAlerts = False
Your code here

Application.DisplayAlerts = True


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
Prompt user for input and utilize that input ninner Excel Worksheet Functions 2 March 28th 07 09:44 PM
Have user input converted to uppercase in same cell as input? Shannonn New Users to Excel 1 June 20th 06 03:19 AM
Pausing macro for user Excel input Tom Ogilvy Excel Programming 0 July 8th 05 04:37 PM
Pausing macro for user Excel input STEVE BELL Excel Programming 1 July 8th 05 04:28 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 11:20 PM.

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"