I have to pass a value to a shape in another sheet in excel but i get an error when the shape does not exist. im also passing the shape name to a string that's why there will be a possibility that the said shape would not exist. i have to define the shape and its value. so please can anyone help me how to validate if the said shape is existing or not.
here's my code but i get an error when its false
VB Code:
If Sheet4.Shapes(gCell).ControlFormat.Enabled = True Then Sheet4.Shapes(gCell).TextFrame.Characters.Text = valCel Else Sheet4.Range(gCell).Value = valCel End If




Reply With Quote