+ Reply to Thread
Results 1 to 3 of 3

File block settings in the trust center

Hybrid View

RJ1969 File block settings in the... 02-17-2023, 01:13 PM
RJ1969 Re: File block settings in... 02-17-2023, 03:00 PM
Marc L Re: File block settings in... 02-17-2023, 03:45 PM
  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,812

    File block settings in the trust center

    Hello,

    The code below was placed in module1 in book2. What it does it copied the data from book1 A1:A10.

    I received an error "you are attempting to open file type(Web Pages and excell 2003 XML Spreadsheet) that has been Block by your file block Settings in the Trust Center."

    So I went to File/Option/Trust Center/File Block Settings and I removed the check from Web Pages and Excel 2003 XML Spreadsheets and even I checked it or uncheck the code still not working.

    When I clicked the macro button, it does something but it's not copying the data from Book1.
    I did input the Full Path File under the Book1.xlm.

    Please help!
    Thank you

    Sub get_data()
     
    Dim Wb1 As Workbook
     
    'Dont update the screen - makes it work faster
    Application.ScreenUpdating = False
     
    'Open the other workbook
    'Input the FULL path to the file, including its extension
    Set Wb1 = Workbooks.Open("C:\Book1.xlm")
     
    'You can do whatever you want here with the other workbook - it is now open.
    'This just copies some cells.
    Wb1.Sheets(1).Range("A1:A10").Copy
     
    'Close the workbook from which we just got some data and make sure not to save it in case accidental changes were made to it.
    Wb1.Close SaveChanges:=False
     
    'Turn on screen updating again - makes Excel usable
    Application.ScreenUpdating = True
     
    End Sub

  2. #2
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,812

    Re: File block settings in the trust center

    Ok... I found where is the correct file path.
    I still get an error when the macro buttong click.

    The error say Error 438 "Object doesn't support this property or method".
    It highlight this section "Wb1.Sheet1.Range("A1:A10").Copy".

    Wb1.Sheets1.Range("A1:A10").Copy
    My book1 where I want to copy is in Sheet1.


    Thank you

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: File block settings in the trust center


    Hello,

    such a bad syntax ! Wb1.Sheets1 so just compare with your initial post code …

+ 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. Replies: 1
    Last Post: 11-05-2018, 03:13 PM
  2. trust center
    By pyrohac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2015, 07:08 PM
  3. Excel 2010 - Lock out Trust Center settings for Disabling All Macros?
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-13-2014, 10:31 AM
  4. Unable to change trust Center Settings
    By joeller in forum Excel General
    Replies: 0
    Last Post: 02-28-2014, 04:14 PM
  5. Excel 2010 Trust Center - How to Un-Trust
    By PosseJohn in forum Excel General
    Replies: 3
    Last Post: 08-04-2013, 01:57 PM
  6. [SOLVED] One of the Settings in Options Trust Center Settings is Grayed out
    By zit1343 in forum Excel General
    Replies: 2
    Last Post: 06-28-2012, 09:18 AM
  7. Excel 2007 : Cant get trust center
    By amsanborn in forum Excel General
    Replies: 4
    Last Post: 07-22-2010, 12:39 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