Results 1 to 5 of 5
  1. #1
    Gail is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    18

    Set Custom Theme using VBA

    Hello. I wrote a program for a company that has several offices.
    They would like each office to have its own color theme.
    I created four different color themes.
    When I install the program at an office, I manually choose the theme.


    Is there a way to set a custom theme using vba?
    Thanks!

  2. #2
    Gail is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    18
    Hi again.
    The only Help I can find is to use
    ThemeColorScheme.Load ("C:\myThemeColorScheme.xml")
    But this doesn't work.
    It says "Variable not defined", but it doesn't work when I define it either.
    I followed this other example from the Help:
    Dim tTheme As OfficeTheme
    Dim tcsThemeColorScheme As ThemeColorScheme
    Set tcsThemeColorScheme = tTheme.ThemeColorScheme
    It doesn't work. I get the error "Object Variable or With Block Variable not Set" on the third line
    tTheme must need to be Set, I've tried but really have no idea what to set it to.
    Can anyone see what is missing from these "Help" examples?
    Or am I on the wrong track?
    Thanks!



  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    15,478
    I have not used custom themes, but I found this link in Similar Threads (at bottom of this page) that may be useful to you.
    Davegri, who wrote the code, is a regular on the forum and may have additional info.
    Good luck.
    Last edited by orange; 08-07-2020 at 05:11 PM. Reason: spelling

  4. #4
    Gail is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    18
    Quote Originally Posted by orange View Post
    I have not used custom themes, but I found this link in Similar Threads (at bottom of this page) that may be useful to you.
    Davegri, who wrote the code, is a regular on the forum and may have additional info.
    Good luck.
    Thank you so much for replying. I had already downloaded his two sample databases and I couldn't find the solution to this problem.
    I will try to get in touch with him. thanks

  5. #5
    isladogs's Avatar
    isladogs is offline Very idle programmer
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    4,688
    @Gail
    I've just written a reply in the other thread started by @davegri
    See https://www.accessforums.net/showthr...947#post459947
    Unfortunately its not the answer you want to hear...
    Colin (Mendip Data Systems): Website, email
    Try again. Fail again. Fail better.
    A
    sking for help isn't giving up. Its refusing to give up.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Theme Manager for Forms
    By davegri in forum Sample Databases
    Replies: 29
    Last Post: 02-22-2021, 12:23 AM
  2. Theme or color gone
    By Perfac in forum Forms
    Replies: 5
    Last Post: 11-23-2018, 09:58 AM
  3. Let users choose the theme
    By csatchell in forum Access
    Replies: 1
    Last Post: 03-13-2017, 07:46 AM
  4. Design My Own Theme??
    By alanfallow in forum Access
    Replies: 2
    Last Post: 01-10-2014, 12:24 PM
  5. Replies: 7
    Last Post: 08-10-2011, 04:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums - Senior Forums