Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VB6 Drawing Shapes In Excel - BuildFreeForm Problem


I am using VB6 to draw shapes on an Excel worksheet but cannot get BuildFreeForm to work.
Excel is Office97 Any advice?

Following is a VB6 test routine
oDraw has been set to a worksheet in an open workbook
Line, Rectangle and Oval all work OK
Private Sub AddBTN_Click()
Dim TmpName As String
With oDraw
'Line
.Shapes.AddLine(350, 60, 450, 100).Name = "Line1"
'Rectangle
.Shapes.AddShape(msoShapeRectangle, 330, 420, 10, 75).Name = "Rec1"
.Shapes("Rec1").Line.Weight = 0.5
'Oval
.Shapes.AddShape(msoShapeOval, 100, 270, 100, 120).Name = "Oval"
.Shapes("Oval").Interior.Pattern = xlNone
'FreeForm
With oDraw.Shapes.BuildFreeform(msoEditingCorner, 360, 200)
.AddNodes msoSegmentCurve, msoEditingCorner, 380, 230, 400, 250, 450, 300
.AddNodes msoSegmentCurve, msoEditingAuto, 480, 200
.AddNodes msoSegmentLine, msoEditingAuto, 480, 400
.AddNodes msoSegmentLine, msoEditingAuto, 360, 200
.ConvertToShape '<--- Causes an error !!!!
.Name = "Fform" '<--- Causes an error !!!!
End With
End With
End Sub

Microsoft VBA routine for BuildFreeForm It works in Excel using VBA
Set myDocument = Worksheets(1)
With myDocument.Shapes.BuildFreeform(msoEditingCorner, 360, 200)
.AddNodes msoSegmentCurve, msoEditingCorner, 380, 230, 400, 250, 450, 300
.AddNodes msoSegmentCurve, msoEditingAuto, 480, 200
.AddNodes msoSegmentLine, msoEditingAuto, 480, 400
.AddNodes msoSegmentLine, msoEditingAuto, 360, 200
.ConvertToShape
End With

Regards Mike




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Drawing Shapes From Excel Data.
Hi.

I'm a summer-time employed student charged with creating a little someting in excel. Since I never have worked with Excel or Visual Basic before, (though I have some programming experience,) I could really need some help.

What I've been asked to do is to create a Excel document/macro where the following is performed:

1) Data is read from sheet 1.

2) A figure based on the data is drawn on sheet 2.

I've managed to figure out how to collect the data and store it in single-float variables, (easy enough,) but I just don't know how to create a figure/drawing/picture out of it. The only help/documentation I've got is the online MSDN.

What possibilities do I have? What methods/functions can I use?

Drawing Shapes In Embedded OLE Excel Spreadsheet
For a project that I am doing, I am embedding an Excel spreadsheet into a VB form as an OLE object. In the spreadsheet I would like to draw shapes, among other things. However, whenever I attempt to draw an shape using the .Shape.AddShape() method, I receive the following error: Run-time error '1004': Application-defined or object-defined error. Here is the code that I am using:

With oleDiagram.object.ActiveSheet.Shapes.AddShape(msoShapeRectangle, 1, 1, 400, 24)
.TextFrame.Characters.Text = "Some Name"
.TextFrame.Characters.Font.Name = "Arial"
.TextFrame.Characters.Font.FontStyle = "Bold"
.TextFrame.Characters.Font.Size = 18
.Line.Visible = msoFalse
End With


I have ran this code as a macro in Excel and it runs fine, but when I attempt to use it for the spreadsheet that I have created in the form, I get the error. I can access the spreadsheet by placing text into the cells using the .Cells(1,1).Value = "something" property and can also copy a shape drawn in Excel into my applications OLE Excel sheet, however cannot draw shapes, lines, etc. Any help would be greatly appreaciated. I have been banging my head on this problem for almost a week now. Thanks!

Drawing Shapes
I wanna draw different shapes (like AutoShapes in MS Word) that can be resized during runtime.

Could any one help me to do this.

Drawing Shapes
hi,

i was wondering how i can make it so the user can draw shapes on the form. I am able to draw lines and erase them, however i am having trouble understanding what the values

top
left
height
and width mean

So i guess my question is, how would i resize an existing shape, called myshape?

if the user clicked on the form that would give an X and Y value, but what are those values translated to in terms of top, left, height and widht?

i am so confused??

any input would help me, thanks!

Drawing Shapes?
I need the user to be able to click & drag to make a shape on a picturebox, like in MS Paint or Photoshop. And I'm clueless

I know it's gonna use currentx & currenty, right?

Drawing Your Own Shapes
is it possible in VB to draw your own shape? Im trying to draw quarter circles??

Drawing Shapes And Rotating Them?
I want to draw , say an equalateral triangle that can be rotated in circles
I have seen it done but dont understand it.


~

Drawing Simple Shapes
http://www.bernardsboe.com/wams/Acad...usedrawing.htm

So basically I am just would like to know how I can create a shape by clicking in the form.

Thanks!

Drawing Shapes In Runtime
i am drawing a box with :
Picture1.Line (sX, sY)-(x, y), vbBlack, B

and circle with:
Picture1.Circle (sX, sY), r

using my x,y xordinates in runtime.

how can i draw a triangle or a polygon?

Drawing Objects Or Shapes...?
I'm not too good with the graphics stuff.....so how difficult would it be to code something to replicate some of the procedures in the images below:

1) User clicks points and lines are drawn from point to point.
2) User right clicks and the shape is closed. Square handles are drawn where the points are. A spline or bezier curve replaces the lines.
3) User clicks outside the shape and the handles are hidden
4) User can click&drag each individual handle to change the shape to a desired shape.

NOTE: Images are from a Golf Game editor that allows you to draw out shapes for Teeboxes, Fairways, Greens, SandTraps, etc. The editor works great, but it won't allow you to import an overhead (aerial) image of a "real golf course", and then layout your golf holes from the image. So I'm gonna try to make an editor that will. Then I plan on saving the point positions, and have my program automatically recreate the shapes based on the point positions in the Golf Game Editor.

Drawing Shapes-fill-database
hello everybody and thanks very much for all ur help so far.

i am developing a program that loads a picture(map) .I have some toolboxes and i want to add something from it to the picture. I have a toolbox with shapes ,square,triangle and polygon.a) I want to draw these shapes on my picture(on a scale that we want,with the mouse) and b)after that to fill these shapes with some pictures(small)that are on another toolbox.

e.x i have a building map and i want to add on it some offices. i have to draw a square on the map and then fill it out with the office picture(s).

Thanks and

Drawing Multiple Shapes In Vbscript?
i need to draw a couple of rectangles in the form (total amount expressed during calculation) in code (and only in code). all rectangles are on the same vertical level, horizontal coordinates progress positively for each new rectangle. when a rectangle is drawn, the next one will be drawn (same size) next to the previous one.
how do i declare a "dynamic shape array" (or whatever the solution is called)? i tried it in a new standard form, this obviously didn't work:

Dim i As Integer
Dim InitL As Integer
Dim A() As Shape

Private Sub Command1_Click()

InitL = 500
A().Shape = 0

For i = 1 To 5 Step 1

A(i).Width = 100
A(i).Height = 100
A(i).Top = 1500
A(i).Left = InitL
InitL = InitL + 50
Next

End Sub

How To Direct Shapes Drawing From A Module ?
hi,
I've decided to direct drawing from a module (create functions) to avoid repetion and because the project has become very big,in another hand I want to call these functions from different forms ,by example I've written the following code in a module:
sub drawtriangle1 ()
form1.line (2040,3120) - (4920,3120)
form1.line (3480,1200) - (2040,3120)
form1.line (4920,3120) - (3480,1200)
end sub
sub drawcircle ()
form2.circle (1200,3000) ,500
end sub
but the problem is how can I draw dot and dash lines from a module.Finally isn't there a better way to create drawing functions that any form can call without mentioning this
form in the procedure as I did above ?
thanks in advance
StrEng24

Working With Shape Controls && Drawing Shapes
Hi...as some may know, I'm still working on my MS Paint-like program. What I'm trying to do is allow the user to click to create the center of a circle, move the mouse to where the edge of the circle will be, and click to create the circle.

I've done it with a rectangle, but I'm having trouble doing it with the circle. Here's my code for the rectangle. Shape1 is a rectangle. You can click and drag and Shape1 is essentially a preview of the rectangle that will be drawn, then when you release the mouse, the rectangle is drawn. Similar to what I want to do with a circle.


Code:
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
CurrentX = X
CurrentY = Y

Shape1.Visible = True
Shape1.Height = 0
Shape1.Width = 0
Shape1.Left = X
Shape1.Top = Y
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
If X > CurrentX And Y > CurrentY Then
Shape1.Width = X - CurrentX
Shape1.Height = Y - CurrentY
End If
End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Shape1.Visible = False
Me.Line (CurrentX, CurrentY)-(X, Y), selectedColor, B
End Sub


Also - Didn't want to start a thread about this cuz It's a pretty lame question, but how do you clear a Picturebox's picture?

Controlling Shapes In Excel
How Can I manipulate this shape without having to select it?


ActiveSheet.Shapes("AutoShape 13").Select
Selection.ShapeRange.IncrementTop -0.6

I if i try

ActiveSheet.Shapes("AutoShape 13").ShapeRange.IncrementTop -0.6

get an object not supported method. What am i missing here?


Any help is appreciated.

Need Help On How To Draw Shapes In Excel
Hi,
i am new into Excel and VB but i have a good base in programming language,
i am working on a project where i should read data from excel to generate a network topologie at the end.
let's say i have this data:

computer 1 should communicate with computer 2 and computer 2 should communicate with 3 and comp3 should communicate with 1.

its easy to enter this info to excel but how can i read this info from excel to generate 3 cercles at this end? each cercle should have the name computer x and to show that this cercles communicate toghether i should show arrows between cercles!!!

i hope i was clear, now any one have an idea how to do this using vb

Excel 97 Cannot Rename Shapes(#).Name
Dear all, I am a new-be in VBA programming, so do not hit me if this question is all too stupid.

Context:
I have designed a Userform which sets up my Excel application. During the setup it copies part of the first sheet several times onto the same sheet, i.e. the first 15 rows are my "mastercopy" of the application and depending on user input x, this mastercopy will be copied x times. My Mastercopy holds 4 command buttons, which are copied one by one after the cells are copied. Then I want to rename the Command buttons, in order to get rid of the default CommandButton1 name. In Excel 2002, no problemo, in Excel 97 however, the name is not changed at all. When looking at the properties of a specific button, the caption has changed yes, but the (Name) field still holds the default button name. The weirdest thing is that when selecting the Command Button in design mode through the Control Toolbox menu, the name shown in the textbox in the left upper corner (right above column A), does show the name that I wanted the button to have. Please help!

FYI, here is my code (The Mastercopy buttons are named SortSTD1, SortEBD1, SortSEQ1 and TIMENOW1)

Sub CopyTRump(ByVal trumpno As Integer)

Dim strPos As String

If trumpnummer <> 1 Then
strPos = "A" & CStr((trumpno - 1) * 16 + 1)
Worksheets("Sheetname").Range("A1:Q15").Select
Selection.Copy
Worksheets("Sheetname").Range(strPos).Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Shapes("SortSTD1").Select
Selection.Copy
Worksheets("Sheetname").Range(strPos).Offset(0, 10).Select
ActiveSheet.Paste
Selection.Name = "SortSTD" & CStr(trumpno)
ActiveSheet.Shapes("SortEBD1").Select
Selection.Copy
Worksheets("Sheetname").Range(strPos).Offset(0, 11).Select
ActiveSheet.Paste
Selection.Name = "SortEBD" & CStr(trumpno)
ActiveSheet.Shapes("SortSEQ1").Select
Selection.Copy
Worksheets("Sheetname").Range(strPos).Offset(0, 12).Select
ActiveSheet.Paste
Selection.Name = "SortSEQ" & CStr(trumpno)
ActiveSheet.Shapes("TIJDNOW1").Select
Selection.Copy
Worksheets("EBDplanner").Range(strPos).Offset(0, 13).Select
ActiveSheet.Paste
Selection.Name = "TIJDNOW" & CStr(trumpno)
Else
End If
End Sub

Excel Shapes - Textframes?
How do I get the text in a shape on an excel sheet?

Code:
    oExcel.Sheets("Sheetname").Select
    oExcel.ActiveSheet.Shapes("Text Box name").Select '(ok so I have the shape selected)
    oExcel.ActiveSheet.Shapes("Text Box name").TextFrame.TextRange.Copy '(doesn't work)
    oExcel.ActiveSheet.Shapes("Text Box name").TextFrame.Characters.Copy '(doesn't work)


 

Group Shapes In Excel
Hi,

I've drawn a lot of shapes on a excel worksheet. Now I want to group
them, but not all of them. I think I need to use the group
command

Sheet(1).Shapes.Range(Array(1, 2, 3, 6).Group

I now want to create the array outside this function,
because there are not always the same shapenumbers to be
included in the group.

So something like this
for a = 1 to shapes.count
if shapeinclude somearray = somearray + a
next


But I can't get it to work. How can I create an array
that's accepted in the group method.

Thanx in advance

How To Select Shapes In A Excel Sheet
Hi All

Suppose I have a 15 of shapes (Rectangles, Ovals etc.) . Now I think the shapes are marked as Shapes("Rectangle 1"),Shapes("Rectangle 2"),Shapes("Oval 3") ....serially.........now my question is how can I make a Macro that is intelligent enough to identify the corresponding shape when I click the shape.......like if I click Shapes("Rectangle 1"), it will return me Shapes("Rectangle 1") or at least "Rectangle 1".......

Copying Excel Shapes From One Workbook To Another
I would like to copy buttons from one workbook to another workbook using vba. Everything copies ok, except for the buttons. When I enter into design mode, and manually copy and paste everything works ok. But when I try to use vba, the buttons are stripped off.

Excel: Select Mult. Shapes If Their Names Contain A String
Hi and thanks for reading my post!

I have [any] number of shapes in one sheet. They have names such as "BigShape 10", "BigShape 11", "MedShape 7", etc.

I need to select all shapes, whose name contain a certain string (for examle "gSh" from the example above).

Could anybody kindly help, please?


Many thanks in advance!!



Pavel

Drawing In Excel
I am using VB 6.0 to do some programming. For my output, I am using Excel. I need to draw a circle for part of it and I am having trouble doing that. I have succesfully drawn lines, but the circle is getting me. The code I am using for drawing a line is
.ActiveSheet.Shapes.AddLine(wkx1, wkY1, wkx2, wkx2).Select
As I said, this works fine. I recorded a macro in Excel to get the code to draw a circle and used this code in my VB6 code and it does not work. The code used was
.ActiveSheet.Shapes.AddShape(msoShapeOval,wkx1, wkY1, wkx2, wkx2).Select

I also have the same problem trying to get text boxes as well.

Any help will be greatly appreciated.

Drawing Textboxes In Excel With VBA
I used VBA in Excel to add textboxes at specified X and Y coordinates (points) using:
For i = 1 to 100
ActiveSheet.TextBoxes.Add(XCoor(i), YCoor(i), 40, 11).Select
etc.
Next i
(40 and 11 are the width and the height of the textbox).

Later, I selected the shapes and tried to get the coordinates of the shape:

For Each S In ActiveSheet.TextBoxes
MsgBox S.Left & " " & S.Top
Next S

I thought the Left and Top properties of a shape would be the same as the coordinates I used to add the shape (textbox), but there is a minor difference of 0.5 (49.5 vs. 50).

Is this simply rounding my coordinates to the nearest available pixel?

Use VB To Control Drawing In Excel
Hi,

I drew a circle on sheet 1 by using the control in drawing panel, how can I control the circle's back color, size and paste location by using VB coding in marco?
please help, thanks alot!

Chris

Excel Drawing Question
I have a map drawn out in Excel. I want to write a program to highlight certain parts of the map. Say for example there is line form one city to another; I want to be able to read in a list of sets of two cities and have the lines between the cities change to a different color, so that they stand out. Is it possible to change the color of a line in code? Each line in the Excel drawing has a line number. Can I just use the line numebr to change the color of the line, or is there another way? I am pretty new to vb, but I have a pretty good programming background. I am still unsure as to it's capabilities and how to implement certain things.

Drawing Function In Excel
Hello all,

Is it possible to make excel draw a function (whitout the use of VB), and if yes, how?

Ex: =A1^2

Drawing Charts In Excel Through VB
Hi all,

Im writing some data to an Excel s/sheet which is all fine, but I also need to produce a chart from my VB app on said s/sheet, using the data I wrote to it.

I had managed to get the chart to display one range of data tho this no longer works since I added other things .

However I really need to display 4 or 5 different ranges on the chart.

I was wondering if anyone had any examples/snippets/URL's of how to do this.

Thanks in advance

J.

Drawing Line In Excel
how i can draw lines in excel using vb

.circle And .line Drawing In Excel
Hi,

I'm normally not a Excel VBA coder. I looked up Drawing, Circle, and Line in the repository and found mostly references to Shape objects being used on a worksheet. Is that my only drawing option in Excel? I was hoping for someway to put a standard picturebox on my Excel Userform.

I'm looking for the basic Circle and Line drawing methods I'm familiar with.

~T

Drawing Excel Chart By Automation
I'm programming in VB and have an array with values, which shall be used for drawing a chart on a Excel sheet by automation.
The following code lines are functioning, but I would like to do it without first putting the values into cells on a sheet. Is it possible to do it easier and faster?
...
Set XL = CreateObject("Excel.Application")
Set XLSheet = XL.ActiveSheet
Set XLChart = XL.Charts.Add
XLSheet.Range("A1:B5") = intArray1()
XLChart.SetSourceData XLSheet.Range("A1:B5"),2
...

Drawing Circles In Excel From A Form :(
I have a class which keeps track of a few circles and draws them in a row using Worksheet.Shapes.AddShape

I was quite happily calling member functions and running them from a module with no problems. Then I tried to implement a form to take input (how many circles, size, position etc) and pass it to the class and have it drawn. I just used a handful of TextBox controls. A button is used to copy all the textbox values when pressed, and pass each to the class. Everything worked as before, except that the first circle in the row will never be drawn. The other circles will be drawn in exactly the right position as if there had been a first circle, but instead there is a blank space.

I have isolated the variable which is passed to the class which causes the problem - it is the x position on the sheet. I have used the locals window to check what value is passed to .AddShape and it is exactly the right value of 400. Yet the circle never appears. Change the button function to call 400 instead of taking the same value from the form, and it is back again.

I have tried passing the variable by value which I would have thought would make the two cases indistinguisable to .AddShape. No luck. I have checked pretty thoroughly that the circle is not just being drawn in the wrong place or somewhere else.

So I give up. Any suggestions would be greatly appreciated, even/especially the general debugging approach you might use for something like this (bear in mind I am a certified newbie....)

Thanks

Can I Control The Drawing Objects On Excel
Dear Forum Members,

Sorry to bother all you so much. Recently I really have plenty of questions because I am rushing for a project.

I am trying to use OLE in my program to control Excel to plot a chart for stock analysis.

The chart plotted will be displayed in the OLE container of a child form in my MDI application. The data is stored in a MS Access DB.

Can I use graphical command buttons like those in paintbrush on a toolwindow in my program to place drawing objects like rectangle, circle on the Chart? Will this be very difficult?

Thanks.

AutoCAD-Excel Drawing Link
How to write code for drawing simple rectangle using data from Excel cells

Drawing Circles In Excel From A Form :(
I have a class which keeps track of a few circles and draws them in a row using Worksheet.Shapes.AddShape

I was quite happily calling member functions and running them from a module with no problems. Then I tried to implement a form to take input (how many circles, size, position etc) and pass it to the class and have it drawn. I just used a handful of TextBox controls. A button is used to copy all the textbox values when pressed, and pass each to the class. Everything worked as before, except that the first circle in the row will never be drawn. The other circles will be drawn in exactly the right position as if there had been a first circle, but instead there is a blank space.

I have isolated the variable which is passed to the class which causes the problem - it is the x position on the sheet. I have used the locals window to check what value is passed to .AddShape and it is exactly the right value of 400. Yet the circle never appears. Change the button function to call 400 instead of taking the same value from the form, and it is back again.

I have tried passing the variable by value which I would have thought would make the two cases indistinguisable to .AddShape. No luck. I have checked pretty thoroughly that the circle is not just being drawn in the wrong place or somewhere else.

So I give up. Any suggestions would be greatly appreciated, even/especially the general debugging approach you might use for something like this (bear in mind I am a certified newbie....)

Thanks

Controlling Position Of A Drawing Object On An Excel Chart
I have a line chart that is an on-going time series chart. Each month I add another data point to the series. I currently have a vertical line drawn on the chart crossing one of the data points representing when an event occurred. I have everything working except how to determine how much (where) to move the line to stay with that month's data point as the points get shifted due to the addition of the new point.

I've looked at all the properties of the Point object hoping to find something like an (x,y) coordinate positioning on the chart (I thought I could use the same x coordinate for my object). But, I can't find anything that seems to work. Does anyone have any ideas to try?

How To Read AutoCAd Drawing File Into VB To Generate The Equivalent Drawing Into VB
Hi,
Sir !
   i am working on a project of transferring the drawing
I want to read the AutoCAD file in to VB program so that i can generate an equivalent drawing with the same co-ordinates.
For this i need to know the file format of AutoCAD drawing file which cantains the co-ordinates of the lines etc( shapes)
"" How i can read the file of AutocAD with extension( .DWG ) into my VB program to get the exact values of the drawing objectsn( lines etc )


Please help me in this regard with your valuable knowledge and experience.

Best Regards,

Rizwan Air University,
  
Please inform me by sendong mail on the following e-mail ID.
E-Mail: ch_rizwan094@hotmail.com

Help With Shapes
Is there any way to give a shape (circle, rectangle, oval) a click event? I want the oval's fillcolor to change when the user clicks on it. Will I just have to photoshop an oval, then use a picturebox or imagebox to get this to work?

Help With Shapes
I am new to VB and i have a question:

Say i have about 20 shapes and i want all of them to move at the same rate at the same time buy pressing the arrow keys. Do i have to write the same code over and over again for each shape or is there a code were i can just have all of them move with just a couple lines of codeing?
If there is will you please tell me the code for this. thanks

Shapes
Is there a way to show wut you are drawing then draw it on mouse up.

Like:

Pic_MouseMove()
pic.circle (x,y), x - pic.currentx
End Sub

Only problem is that it draws a circle everytime you move the mouse i just want it to show one circle that adjust with the mousemove. I cant do pic.cls cause i have other stuff in it that i dont want erased. Any ideas ?

Shapes
Can some one maybe tell me how to simulate 3D shapes in Visual basic?
cheers guys...
magicbeans14

Shapes
how can i do a click event for a shape?

Thanks
Matt

Shapes Not Going To The End
Code:
Option Explicit
Dim t As Boolean
Dim p As Boolean
Dim u As Boolean
Dim a As Integer
Dim b As Boolean

Private Sub Timer1_Timer()
a = 50
If t = False Then
b = True
End If
t = False
If b = True Then
Shape1.Top = Shape1.Top - a
End If
If Shape1.Top + Shape1 <= Form1.Top Then
b = False
End If
If b = False Then
t = True
End If
If t = True Then
Shape1.Top = Shape1.Top + a
End If
If Shape1.Top + Shape1.Height + Shape1 >= Form1.Top + Form1.Height Then
t = False
End If
'edit this part
If p = False Then
u = True
End If
p = False
If u = True Then
Shape1.Left = Shape1.Left + a
End If
If Shape1.Left + Shape1.Width + Shape1 > Form1.Left + Form1.Width Then
u = False
End If
If u = False Then
p = True
End If
If p = True Then
Shape1.Left = Shape1.Left - a
End If
If Shape1.Left + Shape1 <= Form1.Left Then
u = True
End If
If u = True Then
p = False
End If
End Sub

well can someone tell me how to use the things that make the code to read easier and how come my shapes don't get all the way to some sides it stops and changes direction like 2 inches before?

Help With Shapes!
Hi, i made a simple program that allows you choose any file. Then it displays the files size in Bytes, KB, MB, GB, or TB, depending on if it gets to there or not. So if its 323 MB's big it will display MB's instead of KB, or GB. But if its 3323, then it will display 3.3 GB's. Anyways thats beside the point. I also have another form that shows the Free space, Size used, Total space, and Percentage used. Now here is were i need help. If you right click C drive and go to properties it displays the info about the drive, Then in the middle (might be different) it shows 2 circles with one color being the color used and the other color being the space available. How could i add something like that to my form? Thanks in advance

Help With Shapes!
Im trying to make an If-Then statement when to Shapes interact.
I have 1 shape that moves up and down and another that moves side ways all on a timer.
When they hit i want a message box to appear.

How could i go about doing this?

Shapes
I need to cut rectangular pieces of various sizes from a large board. could someone help me with the code to randomize until i get the best fit and the most use from the large board as possible.

Board size = 1830mm x 2750mm
pieces that need to be cut is:-
884x884
884x884
770x570
1318x570
1318x570
100x900
100x884
100x516
200x2650
Thanks for you assistance
Brian

Shapes
I know this is a stupid question but how do I get the circle shape instead of the square?

ADO Shapes
If i create a shap in the data envrionment, is adding new records avalible to the sub-recordset ? i know that i can view, but i also what to add stuff to the recordset so is that possible?

VBA Shapes
Hi all,
Been a long time since i posted.. don't know if that's a good thing or bad!!!!

I have a quick question in VBA (Excel) I am adding a shape to the ActiveSheet by using:

ActiveSheet.Shapes.AddPicture cFile, True, True, 66, 665, 259, 175

This all works fine, but what I need to to is reselect this shape and delete it.

Does any one know how I can do this. I was thinking about using the .Shapes.SelectAll method but thier maybe more then one shape in the worksheet and I don't want to delete that one.

Any ideas Views would be great.

Many thanks in advance

Copyright 2005-08 www.BigResource.com, All rights reserved