Adding an image to a database

doudy11

New Member
Joined
Nov 13, 2022
Messages
1
Office Version
  1. 2021
Platform
  1. Windows
Hello friends
I have a form that I prepared and I want to add to it an option to add an image in the "i" column (when I click on save)
I searched here in the forum for some solutions and I couldn't. Can anyone direct me?

This is the code for the save button
Sub Save() Dim frm As Worksheet Dim database As Worksheet Dim iRow As Long Dim iSerial As Long Set frm = ThisWorkbook.Sheets("Form") Set database = ThisWorkbook.Sheets("Database") If Trim(frm.Range("M1").Value) = "" Then iRow = database.Range("A" & Application.Rows.Count).End(xlUp).Row + 1 If iRow = 2 Then iSerial = 1 Else iSerial = database.Cells(iRow - 1, 1).Value + 1 End If Else iRow = frm.Range("L1").Value iSerial = frm.Range("M1").Value End If With database .Cells(iRow, 1).Value = iSerial .Cells(iRow, 2).Value = frm.Range("I10").Value .Cells(iRow, 3).Value = frm.Range("I12").Value .Cells(iRow, 4).Value = frm.Range("I14").Value .Cells(iRow, 5).Value = frm.Range("I16").Value .Cells(iRow, 6).Value = frm.Range("I18").Value .Cells(iRow, 7).Value = Application.UserName .Cells(iRow, 8).Value = [Text(Now(), "DD-MM-YYYY HH:MM:SS")] End With frm.Range("L1").Value = "" frm.Range("M1").Value = "" End Sub

And this is the situation where I want to add the image
111111.png
 

Attachments

  • 111111.png
    111111.png
    7.8 KB · Views: 8

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,223,884
Messages
6,175,175
Members
452,615
Latest member
bogeys2birdies

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