Need an EXPERT in VBA and knowing how to manipulate objects on an excel sheet

H

holysoul

Hi,

my problem is that i have sheet on which i have an image. On thi
image, I've got "Shapes" which are a part of an other excel sheet grid
(They were selected to be the object to import) and i want to writ
some content in these Objects by specifying a range or cell where t
write in that grid.

I can do this but my problem is that whenever i write something in it
i have to open the "shape" (so it opens as an other excel file), write
then close it... and that is for the 15 shapes I have on my image
Doing this for some time usually crash my program because i'm out o
memory.

my question would be: can i wrtie in these Objects specifying a rang
without having to open and close each of them one a after an other????

My code is:

ActiveSheet.Shapes("Machine").Select
Selection.Verb xlOpen
Range("A4").Value = vMachine
ActiveWindow.Close

ActiveSheet.Shapes("Calandre").Select
Selection.Verb xlOpen
Range("B3").Value = vCalandre1
Range("B4").Value = vCalandre2
Range("B5").Value = vCalandre3
ActiveWindow.Close

.....
and so on!

reply if you have any question, need help!

Holysou
 
D

Don Guillett

I'm not sure what you are trying to do or if this will help. I have a list
of shape names and to the right of that what I want to put in the box. I
then execute this
Rectangle1 my1stname
Rectangle 2 my2ndname
Rectangle 3 mythirdname


Sub NameShapes()
Sheets("checks").Select
For Each c In [setup!a4:a14]
ActiveSheet.Shapes(c).Select
'Selection.Characters.Text = "whatever" & Chr(10) & ""
Selection.Characters.Text = c.Offset(0, 1)
Next
End Sub
 
H

holysoul

Thx but my problems is a little bigger... the object i inserted is fro
another excel file ... so it's a part of a excel sheet with Header fo
the collumn and the borders of the shape.

So when i write something in my object i want to give its a range o
position where to write in my object without having to open it .
Because when i open the object, it opens an other excel file, write i
it , then close it... and doing this seems to gradualy fill my memor
because the closed excel sheet don't erase them self in the memory or
don'T know ...!

so if you have another idea or anything else....
or way to erase mermory allocated for excel with commands in vba

please respond!

Holysou
 

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