+ Reply to Thread
Results 1 to 5 of 5

Force destination formatting

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question Force destination formatting

    Hi,
    sorry for this noob question but I'm searching thru the Internet and this forum for quite a while now..Without any results.. (Or I did not regarded them as results)

    Situation:
    I have a spread sheet in Excel 2010 where the user should copy and paste data from a IE window into.
    I wanted to have a Macro that automatically chooses "Match destination formatting" when CTRL+V is used to paste.

    The code:
    Please Login or Register  to view this content.
    The problem:
    This works quite well when the user is actually pasting from the IE.
    BUT: If the user uses CTRL+V for any other paste (e.g. to paste a cell or anything) it produces a
    "Run-time-error 1004"
    "PasteSpecial method for Worksheet class has failed"

    I must admit that it goes beyond my skills to fix this...
    Any advice how to solve this problem would be highly regarded.

    Kind regards,
    Krumel
    Last edited by krumel; 05-13-2013 at 11:31 PM.

  2. #2
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Force destination formatting - Problem when nothing to force

    Change your shortcut Key to another?
    View Macros > Select your macro > option
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Force destination formatting - Problem when nothing to force

    Sadly this is not an option...It already was a nightmare to explain copy and paste to the users (I'm working with "best agers" volunteers)...There must be a VBA solution somewhere.

  4. #4
    Registered User
    Join Date
    05-13-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Force destination formatting - Problem when nothing to force

    I think I found a different approach.

    Please Login or Register  to view this content.
    If this is used inside the workbook it should keep the formatting.

  5. #5
    Registered User
    Join Date
    05-13-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Force destination formatting - Problem when nothing to force

    The solution above has two problems I meanwhile found out:
    1. The performance is poor
    2. It crashes if it can not paste e.g. if the user tries to paste a value in a protected cell, etc.

    Therefor I keep this open.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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