+ Reply to Thread
Results 1 to 2 of 2

Macros paste as pictures not working

  1. #1
    Forum Contributor
    Join Date
    12-17-2012
    Location
    indonesia
    MS-Off Ver
    Excel 2019
    Posts
    170

    Macros paste as pictures not working

    Hi,

    I usually use this macro everyday and no trouble found, today it come up with error error 1004.jpg

    After I click debug as below
    error 1004 debug.jpg

    Below is the macros I used
    Please Login or Register  to view this content.
    Sub copyAsImageToDailyFlash()
    Dim wb As Workbook
    Dim rng As Range

    Set rng = ActiveWorkbook.ActiveSheet.Range("A1:F51")
    Set wb = Workbooks.Add

    rng.Copy
    wb.ActiveSheet.Pictures.Paste
    wb.SaveAs "d:\doc\REPORT F&B\Daily Cost F&B Report\Daily Flash Cost F&B " & Format(Now - 1, "dd.mm.yy") & ".xls"
    Application.CutCopyMode = False
    End Sub
    Please Login or Register  to view this content.
    As I remember I don't change the macros. Is there a way to fix this?

    Regards,
    Andy

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macros paste as pictures not working

    Hi,

    I can't see anything in the code that should give an error. Would you upload the workbook so that we can test in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. Error inserting pictures through Macros
    By jrjhaveri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-25-2014, 12:36 PM
  2. problem with how if insert copy paste working steps of macros when using VBA code
    By herukuncahyono in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2013, 04:23 AM
  3. Connect 4! Pictures and macros
    By freud1 in forum Excel General
    Replies: 5
    Last Post: 07-28-2008, 06:50 PM
  4. Working with Macros - ActiveSheet.Paste
    By lunar1085 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2006, 03:55 PM
  5. Working with Macros - ActiveSheet.Paste
    By lunar1085 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2006, 12:25 PM
  6. Working with Macros-Activesheet.Paste
    By lunar1085 in forum Excel General
    Replies: 0
    Last Post: 02-03-2006, 12:13 PM
  7. [SOLVED] Macros associated with pictures
    By Eric in forum Excel General
    Replies: 2
    Last Post: 04-29-2005, 06:06 PM

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