aacdb files?
Funny, I cant use to create form in this format at all...
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
With access 2021 I am trying to display an MSO image of the CommandBars object either in a button or in an image object on a form.
Here is the VBA code used to display the image in a button enter code here.
Private Sub Commande3_Click()
Me.btnEssai.Picture = Application.CommandBars.GetImageMso("Paste", 16, 16)
End Sub
When I run this code I get the following error:
runtime error '2220'
Microsoft cannot open the file.
If I assign the MSO image to a variable, I do get a value.
I was also able to try with Access 2016 which reports the same error.
Where is the problem?
I performed the same test in Excel 2021 with viewing the MSO image in an Image object, it worked fine.
aacdb files?
Funny, I cant use to create form in this format at all...
Ok, sorry I wanted to help because I know Excel, Outlook, PP and Word as well but ACC I use as a database only, so I try to check that on my site to agree with you or say that works on my site because that instructions works in Excel without any problems. In fact Application.CommandBars had a commend GetImageMso in ACC then only check is a right way
So as you mention i create form as you showing me and I do not see any changes in VB Editor. :/
So sorry I cant help you in this moment.
Yeah, OMG I do it, and I see the same problem.
I try assigned this image to many controls and to picture object. Deferent error and the same commend. No success.
From hard drive using file path no problem (even without loadpicture() function) so if save GetImageMso as file somehow
I try and ... failed.
or you can use Excel to save it as pictures library for your ACC project that 'll work.
or use couple hidden picture, and replace it using code.