473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using Selection.ShapeRange to control Shapes

Hi,

In VBA, you can select shapes and control them using
Selection.ShapeRange. There is no equivalent in C#.
See
http://msdn.microsoft.com/library/de...HV05205006.asp

In C#, the Selection(range) object does not have a ShapeRange property.
Does anyone know how to obtain a collection of the currently selected
shapes?

I am trying to simulate this VBA code.

Set aShape = srcSheet.DrawingObjects.ShapeRange.Group
x = aShape.Left
y = aShape.Top
aShape.Copy

dstSheet.Paste
Selection.Left = x
Selection.Top = y
Selection.ShapeRange.Ungroup

aShape.Ungroup

Jun 20 '06 #1
0 3079

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Adeel | last post by:
Hello, This is Adeel! Well i'm a software developer here in Pakistan working on Microsoft C#. Can you u plz help me out i have a problem in creating an ARROW-CONNECTOR SHAPE using Microsoft...
10
by: Lars Netzel | last post by:
Hi! I have a property of a Control (a button I'm making) that makes it possible for the user to choose what shape a button should have... Round, Square, Triangle... How do I in the designer...
2
by: Carl Gilbert | last post by:
Hi I have a math kinda problem where I'm trying to split some lines when two or more lines connect two shapes. The reason I am doing this is to make it clear that there are multiple lines...
5
by: Saber | last post by:
Hello, I'm going to begin a project like an editor, The users can use 2 shapes and lines to draw and connect some diagrams. Just like the editor in Microsoft Visio. (using drag and drop to place...
1
by: koia | last post by:
Hi, I have a problem with adding attributes to a Line in an Excel drawing using the Python win32com interface. From recording in Excel I get the Macro: Sub Makro1()...
0
by: Ruta | last post by:
Anyone working on VB .NET please reply I am developing a project which is similar to MS Paint. The only difference is that each tool has its own properties (like VB). By tool I mean...
0
by: =?Utf-8?B?SmFj?= | last post by:
hi, I would like to create a Excel macro that can help me to create charts. First, I created the Excel macro as below:- Sub Macro1() Selection.CurrentRegion.Select...
8
by: moondaddy | last post by:
I'm posting code for a user control ( FunctionConnectorSelector) below which has 3 content controls in it. each content control uses a style from a resource dictionary merged into the app.xaml...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.