+ Reply to Thread
Results 1 to 2 of 2

Problem with macro to copy a text box with image into multiples files using Quick Access T

Hybrid View

  1. #1
    Registered User
    Join Date
    05-17-2014
    MS-Off Ver
    Excel 2003
    Posts
    1

    Cool Problem with macro to copy a text box with image into multiples files using Quick Access T

    Hi,
    I'm a very basic user and over time have developed an invoicing system for my business which is much faster to use than other small business accounting software.

    I would like to be able to write a "Market Update" (which incorporates a clipart image) in a text box in one Excel file, ( "Market News Flash") then simply press a Quick Access Toolbar icon when using the invoice file for each customer (" Invoice Template").

    I tried using the record macro function however this did not work. I then tried to modify per suggestions from internet etc (non-specific). The code used is:

    Windows("Market News Flash.xlsx").Activate
        ActiveWindow.WindowState = xlNormal
        ActiveWindow.WindowState = xlNormal
        ActiveSheet.Shapes.Range(Array("Group 8")).Select
        Selection.Copy
        Windows("Invoice Template.xlsm").Activate
        ActiveWindow.WindowState = xlNormal
        ActiveWindow.WindowState = xlNormal
        Range("B35").Select
        Selection.Paste
        Range("B33").Select
        ActiveWorkbook.Save
    End Sub
    The resulting error is "Run-Time 438 Object doesn't support this property or method" Too be honest I thought this would be a basic copy/paste macro but 2-3 hours later I'm still struggling.
    Would greatly appreciate any help.
    Cheers from Oz
    Last edited by JBeaucaire; 05-18-2014 at 04:03 PM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Problem with macro to copy a text box with image into multiples files using Quick Acce

    How about this?

    This assumes both workbooks are open.

    Sub Temp2()
    Dim WB1 As Workbook
    Dim WB2 As Workbook
    Dim Shp As Shape
    
    Set WB1 = Workbooks("Market News Flash.xlsx")
    Set WB2 = Workbooks("Invoice Template.xlsm")
    
    Set Shp = WB1.Worksheets(1).Shapes("Group 8")
    Shp.Copy
    
    WB2.Worksheets(1).Paste
    
    With WB2.Worksheets(1).Shapes(WB2.Worksheets(1).Shapes.Count)
            .Top = Range("B38").Top
            .Left = Range("B38").Left
        End With
    
    End Sub
    David
    (*) Reputation points appreciated.

+ 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. Macro to copy table to word as an image (problem)
    By rodroliveira in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2014, 06:58 PM
  2. How to change help text associated with a macro button on Quick Access Toolbar?
    By XmisterIS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2014, 06:49 AM
  3. Replies: 0
    Last Post: 08-10-2012, 03:09 AM
  4. Exporting image files stored in access to excel
    By EXCEL123456 in forum Excel General
    Replies: 0
    Last Post: 02-14-2012, 02:34 PM
  5. Macro to copy data from multiples files
    By p1rate78 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2009, 05:35 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