ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need an EXPERT in VBA and knowing how to manipulate objects on an excel sheet (https://www.excelbanter.com/excel-programming/297834-need-expert-vba-knowing-how-manipulate-objects-excel-sheet.html)

holysoul

Need an EXPERT in VBA and knowing how to manipulate objects on an excel sheet
 
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

--
Message posted from http://www.ExcelForum.com


Don Guillett[_4_]

Need an EXPERT in VBA and knowing how to manipulate objects on an excel sheet
 
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

--
Don Guillett
SalesAid Software

"holysoul " wrote in message
...
Hi,

my problem is that i have sheet on which i have an image. On this
image, I've got "Shapes" which are a part of an other excel sheet grids
(They were selected to be the object to import) and i want to write
some content in these Objects by specifying a range or cell where to
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 of
memory.

my question would be: can i wrtie in these Objects specifying a range
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!

Holysoul


---
Message posted from
http://www.ExcelForum.com/




holysoul[_2_]

Need an EXPERT in VBA and knowing how to manipulate objects on an excel sheet
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com