473,396 Members | 2,020 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,396 software developers and data experts.

add AUTOSHAPES to excel doc in VB 6.0

Hi,

Can anyone tell me how to add AUTOSHAPES to excel via VB Code???
Dec 26 '07 #1
4 2092
Dököll
2,364 Expert 2GB
Hi,

Can anyone tell me how to add AUTOSHAPES to excel via VB Code???
I am not sure how this can be done, amolbehl... Do stay tuned for added support. Will let you know I happen to see something:-)

Updated your title, hope you don't mind; helps you get better hits...

In a bit!
Dec 27 '07 #2
ok I found the solution to my problem now I have another problem. When I execute the code I have given below, I get runtime Error 1004 - Specified value is out of range.

Expand|Select|Wrap|Line Numbers
  1. Set oXL = CreateObject("Excel.Application")
  2.     oXL.Visible = True
  3.     Set oWB = oXL.Workbooks.Add
  4.     oWB.Windows.Application.Visible = true
  5.     Set oSheet = oWB.ActiveSheet
  6.     oSheet.Name = "TEST"
  7.     oSheet.Visible = xlSheetVisible
  8.  
  9.     Dim left As Single
  10.     Dim top As Single
  11.     Dim wide As Single
  12.     Dim height As Single
  13.  
  14.     left = 100
  15.     top = 100
  16.     wide = 100
  17.     height = 100
  18.  
  19.     oSheet.Shapes.AddShape msoShapeRectangle, left, top, wide, height
  20.  
Can anyone help me to solve this error.

What are the appropriate values for left,top and wide and height?
Jan 12 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

The Co=Ordinates are OK, but the Code is :

Expand|Select|Wrap|Line Numbers
  1. oSheet.Shapes.AddShape(msoShapeRectangle, 100, 100, 100, 100).Select
  2.  

Regards
Veena
Jan 12 '08 #4
Thanx a lot.


I had another question .... the image I insert has to be in a position relative to cell no. At one time it might be way down and other times it may be way up.

Is there anyway to set the coord in terms of cells ... I mean some kind of mapping from cells to points (Coordinates) ??
Jan 24 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: E Harris | last post by:
Hello all, and thanks in advance for any help. I've inherited a PowerPoint application that needs some serious retooling. It consists of one slide depicting a well and about 2 dozen text boxes...
13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
22
by: Howard Kaikow | last post by:
There's a significant problem in automating Excel from VB .NET. Reminds me of a problem I encountered almost 3 years ago that was caused by the Norton Auntie Virus Office plug-in. Can anybody...
9
by: Anthony | last post by:
To me, creating Excel 2003 spreadsheets programmatically via VB.NET hasn't really changed since the days of VB6. That is, I'd do something similar to this Code: Dim ExcelApp As...
7
by: Alain \Mbuna\ | last post by:
Hi everybody. In my program I have some data that is calculated after some input from the user. I have written some code that opens an Excel workbook, with 5 worksheets and the calculated data...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.