Dynamically Change Cell Contents From VB

M

mdv_tw

I need to have the integer contents of a cell change automatically when the
string content of a different cell is equal to a specific string. Both cells
presently utilize data validation (list) and the validation capability must
be maintained. The two cells have been given names, as well. For now, just
refer to them as "rngCellName1" and "rngCellName2".

Also of importance, the following code is currently in use to insert twelve
different pictures into my worksheet -

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("rngPicNameBC1C1")) Is Nothing Then
InsertPicFromFileBC1C1 _
strFileLocBC1C1:=Range("rngPicLocationBC1C1").Value, _
rDestCellsBC1C1:=Range("rngPicDisplayCellsBC1C1"), _
blnFitInDestHeightBC1C1:=True, _
strPicNameBC1C1:="MyDVPicBC1C1"
End If

The code is replicated in twelve consecutive "IF Not" statements with simple
variable name changes representing the twelve different picture locations in
the worksheet. I don't know if this code would conflict with any new logic
designed to solve my problem.

Any solutions?
 

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

Top