Hi Everyone,
I have a button and i need help your assistance in a macro on this button with following output.
1. Motive of this button is to insert document into excel as an icon
2. Document path should be based on A1 (Drive Location) + file name mentioned in code (.pdf)
3. Document caption should be defined in Code.
4. Cell location should also defined in code
Currently i have below code but it's not working and i know there is a need of amendment in this:
PSub Button21_Click()
Worksheets("Sheet1").OLEObjects.Add Filename:="c:\temp\sample.pdf", Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, Width:=150, Height:=10
End Sub
If m changing DisplayAsIcon as Yes it's uploading but no icon is there. it's showing as a blank icon.
Please help me with this. let me know if you need any information around this
Thanks
I have a button and i need help your assistance in a macro on this button with following output.
1. Motive of this button is to insert document into excel as an icon
2. Document path should be based on A1 (Drive Location) + file name mentioned in code (.pdf)
3. Document caption should be defined in Code.
4. Cell location should also defined in code
Currently i have below code but it's not working and i know there is a need of amendment in this:
PSub Button21_Click()
Worksheets("Sheet1").OLEObjects.Add Filename:="c:\temp\sample.pdf", Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, Width:=150, Height:=10
End Sub
If m changing DisplayAsIcon as Yes it's uploading but no icon is there. it's showing as a blank icon.
Please help me with this. let me know if you need any information around this
Thanks