VBA Calendar With Images

Ivy_1011

New Member
Joined
Mar 19, 2021
Messages
18
Platform
  1. Windows
I have source code below that enables me to place data in cells, I am happy with how it works, but would like to add some additional features:

1. Update automatically upon opening file
2. Center and lock images into cell.
3. If an image is not available in the path folder then leave it empty.

Attached is an image of the original source file; I have changed the code a bit.

Public Sub Insert_File()
Dim i As Integer
Dim J As Integer
Dim num As Integer
num = 0
Dim arr3
Dim col As Integer
col = 0

arr3 = Array("A", "B", "C", "D", "E", "F", "G")

ActiveSheet.Pictures.Delete

Columns("A:G").ColumnWidth = 41
Rows("1:4").RowHeight = 195

For i = 1 To 4
col = 0

For J = 1 To 7
num = num + 1

Cells(i, J).Value = 1 + num & ".jpg"
Filename = "C:\Users\isaac\Downloads\inser\" & 1 + num & ".jpg"
With ActiveSheet.Pictures.Insert(Filename)

.Left = ActiveSheet.Range(arr3(col) & i).Left
.Top = ActiveSheet.Range(arr3(col) & i).Top + 1
.Placement = 1
col = col + 1

End With

Next J

Next i

End Sub
 

Attachments

  • multi image.JPG
    multi image.JPG
    81.4 KB · Views: 13

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,215,644
Messages
6,125,991
Members
449,278
Latest member
MOMOBI

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top