• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

Change application icon with vba

Can I change the application Icon (under Tools | Startup | Application Icon) using VBA.  It will actually be in another database, though I assume if I can do it at all then I can do it in another database with opencurrentdatabase

Thanks

Shane
0
cdhbsd
Asked:
cdhbsd
  • 3
  • 2
1 Solution
 
flavoCommented:
Dim acc As Access.Application
Dim db As DAO.Database
Set acc = New Access.Application
acc.OpenCurrentDatabase "C:\db7.mdb"

Set db = acc.CurrentDb

db.Properties("AppIcon").Value = "c:\myICON.ICO"


Dave
0
 
cdhbsdAuthor Commented:
I get property not found? - I'm using '97
0
 
flavoCommented:
Im using A97 too.

Ok, you may need to open the other database and set it to something before you can change it like this (Tools - Startup) because until you do this, the db wont have this property, otherwise we COULD test to see if it exists, if it doesnt create it (not 100% sure how to do that)


Dave
0
 
flavoCommented:
Thanks mate.  Good luck
0
 
cdhbsdAuthor Commented:
I couldn't seem to create the property either, but setting an icon initially seemed to work

Shane
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now