how to replace drawing with text in that cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have imported data from web to excel and it comes with check boxes
(picture). When I select any particular cell with that check box, cell is
empty. I need to export this information in my Access database. When I do
that no check box is exported. Check boxes are marked as "picture 1" to
"picture 340". Every check box have diff. name. Is there any way I can
replace this check boxes with text as "YES" in the respective cell.

Please help

Thanks
 
Pictures are considered as shapes in Excel. You could try looping
through each picture.

Dim shp as shape

For each shp in activesheet.shapes
shp.delete
Next shp

This should start you off. You then need to tackle writing YES in the cell.

HTH,
Gareth
 
Building on Gareth's suggestion...

Option Explicit
Sub testme()
Dim Pict As Picture
For Each Pict In ActiveSheet.Pictures
If LCase(Pict.Name) Like "picture *" Then
Pict.TopLeftCell.Value = "Yes"
Pict.Delete
End If
Next Pict
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top