+ Reply to Thread
Results 1 to 2 of 2

PasteSpecial

  1. #1
    John Austin
    Guest

    PasteSpecial

    I have a VB6 app that uses Excel to create spreadsheets. It needs to use
    PasteSpecial with xlPasteValues extensively.
    Whilst the program is getting Excel to Copy / PasteSpecial, the users often
    inadvertantly use copy / paste in another application. This either causes
    junk in the Excel spreadsheet or junk in their other app.

    I would like to get around this problem, so is there:
    a) a means of copying without use of the clipboard that will place values,
    not formulas in the destination cells (eg Range.CopySpecial (Dest,
    xlCopyValues) ), or
    b) a means of locking the clipboard for the duration of the few hundred Copy
    / PasteSpecial operations, or
    c) a means of stopping the user using the clipboard in other apps whilst the
    Excel routine is running, or
    d) any other idea that will overcome the problem?

    Many thanks,
    --
    John Austin

  2. #2
    Charlie
    Guest

    RE: PasteSpecial

    Why do you need to use copy/paste? In your VB app you can get and put
    two-dimensional data like this:

    Dim RangeGrid() As Variant
    RangeGrid = Range("A1:Z26")
    (code here to modify data as necessary in 2D-array)
    Range("Sheet2!A1:Z26").Value = RangeGrid


    "John Austin" wrote:

    > I have a VB6 app that uses Excel to create spreadsheets. It needs to use
    > PasteSpecial with xlPasteValues extensively.
    > Whilst the program is getting Excel to Copy / PasteSpecial, the users often
    > inadvertantly use copy / paste in another application. This either causes
    > junk in the Excel spreadsheet or junk in their other app.
    >
    > I would like to get around this problem, so is there:
    > a) a means of copying without use of the clipboard that will place values,
    > not formulas in the destination cells (eg Range.CopySpecial (Dest,
    > xlCopyValues) ), or
    > b) a means of locking the clipboard for the duration of the few hundred Copy
    > / PasteSpecial operations, or
    > c) a means of stopping the user using the clipboard in other apps whilst the
    > Excel routine is running, or
    > d) any other idea that will overcome the problem?
    >
    > Many thanks,
    > --
    > John Austin


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1