PC Review


Reply
Thread Tools Rate Thread

how do i prepare a macro to insert drawing object on specific cell

 
 
Harshad
Guest
Posts: n/a
 
      25th Nov 2008
I have 54 sheet WB. I have a drawing, which i want to run on Each sheet named
"Exp..".The drawing is a chemical reaction drawn from chemistry software ISIS
Draw. Unfortunately i can't past it here.






 
Reply With Quote
 
 
 
 
Shane Devenshire
Guest
Posts: n/a
 
      25th Nov 2008
Hi,

Record it, then if it doesn't work post the code and we can modify it.
(Don't know what you mean by "run" on each sheet?

Turn on the recorder - choose Tools, Macros, Record New Macro, give it a
name without spaces, and click OK. Do the steps you want on one of the
sheets and then turn off the recorder.


Cheers,
Shane Devenshire

"Harshad" wrote:

> I have 54 sheet WB. I have a drawing, which i want to run on Each sheet named
> "Exp..".The drawing is a chemical reaction drawn from chemistry software ISIS
> Draw. Unfortunately i can't past it here.
>
>
>
>
>
>

 
Reply With Quote
 
Harshad
Guest
Posts: n/a
 
      25th Nov 2008
Thanks Shane,
Actually the following code is working nicely, but i have few problems.
My mean to say that if i change the place of ISIS Draw file or delete it, it
isn't working. In other case when i send only macro cointained xls file to
others via mail, will the code works? If i send both the files(macro
cointained xls file and drawing cointaining file) to my friend, whose PC
don't have ICICI Draw software, will it work?
If yes than my problem is solved but in case no, what should i do so that i
can run code without giving reference file.

My code is:
Sub ISISDraw()
Dim I As Integer
For I = 1 To 50
Sheets("Exp " & I).Activate
ActiveCell.Offset(7, 7).Range("A1").Select
ActiveSheet.OLEObjects.Add(Filename:= "D:\for macro.skc",_
Link:=False,DisplayAsIcon:=False).Select
Selection.ShapeRange.IncrementLeft 48#
Selection.ShapeRange.IncrementTop 1.5
Selection.ShapeRange.IncrementLeft -27.75
ActiveCell.Offset(-4, 0).Range("A1").Select
ActiveSheet.Shapes("Object 1").Select
Selection.Locked = False
Next I
End Sub





"Shane Devenshire" wrote:

> Hi,
>
> Record it, then if it doesn't work post the code and we can modify it.
> (Don't know what you mean by "run" on each sheet?
>
> Turn on the recorder - choose Tools, Macros, Record New Macro, give it a
> name without spaces, and click OK. Do the steps you want on one of the
> sheets and then turn off the recorder.
>
>
> Cheers,
> Shane Devenshire
>
> "Harshad" wrote:
>
> > I have 54 sheet WB. I have a drawing, which i want to run on Each sheet named
> > "Exp..".The drawing is a chemical reaction drawn from chemistry software ISIS
> > Draw. Unfortunately i can't past it here.
> >
> >
> >
> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to insert an object in a specific cell 2007` mpsears62 Microsoft Excel Misc 2 7th Jul 2008 07:04 PM
Macro 2 insert formula if part of cell contains specific text Joek Microsoft Excel Programming 5 27th Jun 2008 04:19 PM
Animating an object from a specific place on my drawing =?Utf-8?B?VGFtbXk=?= Microsoft Powerpoint 3 6th Aug 2007 03:24 PM
Cannot make macro to insert ink drawing =?Utf-8?B?RWxiZXJ0?= Microsoft Word Document Management 0 31st Jul 2005 09:48 PM
Can you insert a drawing INTO a cell? Mctabish Microsoft Excel Discussion 4 11th Nov 2004 11:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:25 PM.