+ Reply to Thread
Results 1 to 3 of 3

VBA / Macro - Troubles with Copy & Paste right font

  1. #1
    Registered User
    Join Date
    05-04-2015
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    16

    VBA / Macro - Troubles with Copy & Paste right font

    Dear all,

    Recently I've started working with VBA & Macros and although I've come a long way (humbly said), I've stumbled upon a problem. Right now, I am able to copy&paste the right cells in the right place (clicking a button means adding (pasting) a range of copied cells below the last filled cell range) and now I am also able to delete the cells. The last thing I need is a font change, only for the pasted cells.
    With my current knowledge, I've been able to correctly adjust the font only of the first set of pasted cells. So, in other words, my font change code is static where I need it to be changing with range, dynamic. This means that every part of cells pasted below gets the same font.

    This is my code:
    Please Login or Register  to view this content.
    I guess that right at the lines I've made bold, I need to insert this 'dynamic code', the sort of code used in the underlined/italic lines.
    Lots of thanks in advance, any help is welcome!

    Cheers

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: VBA / Macro - Troubles with Copy & Paste right font

    Hi Lennart,

    I think that the "IsEmpty" doesn't work that way - try

    Please Login or Register  to view this content.
    instead
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    05-04-2015
    Location
    Rotterdam, The Netherlands
    MS-Off Ver
    2013
    Posts
    16

    Re: VBA / Macro - Troubles with Copy & Paste right font

    Hi xladept,

    Thanks for the reply, appropriate rectification. Still works when using the 'If Not IsEmpty("C15:C20")' statement though.
    So I guess this that is not really the problem, any other suggestions?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel Macro - Copy & Paste (Font) problem & Delete Last Added Rows problem
    By LennartB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2015, 06:58 AM
  2. Replies: 1
    Last Post: 07-07-2014, 04:42 PM
  3. [SOLVED] Copy and paste Excel chart in Word --> font compresses
    By ScooterGirl in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 02-09-2006, 11:30 PM
  4. Copy & Paste Losing Font Colors
    By Mark Tierney in forum Excel General
    Replies: 1
    Last Post: 08-19-2005, 04:05 PM
  5. [SOLVED] Changing default font for copy / paste
    By LaMonk in forum Excel General
    Replies: 1
    Last Post: 06-23-2005, 02:05 PM

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