Create Circle Object (manipulate Within A Sheet)

Oct 16, 2008

I'm trying to learn about class modules and how to create object that i can manipulate within a sheet.

i'd like to create a simple cirlce object that i can visibley see on a sheet.

is this possible and if so any idea on how i start?

View 3 Replies


ADVERTISEMENT

Create Macro To Chart Data With Location As Object In Active Sheet

Oct 11, 2006

I have been trying to create a macro in excel to chart a selection of data and to output the chart on the active sheet where the data was taken (as opposed to a named sheet). So basically, I have about 300 worksheets with data, and I would like to have a button on each page that automatically charts that data when clicked, and outputs the chart to the page where the macro was clicked. However, I have not been able to figure out a relative reference that will allow me to make the LocationasObject reference simply the ActiveSheet as opposed to a specifically named sheet. See my code below, which references an output to a worksheet called "Charts". Right now, all of my charts are outputting to the sheet called "Charts", as opposed to the active sheet.

Sub ConsDiscChart()
ActiveCell.Offset(29, 11).Range("A1").Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlUp).Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1:B1").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Offset(0, -1).Range("A1:C24").Select
Charts.Add
ActiveChart.ChartType = xlLineMarkers
ActiveChart.Location Where:=xlLocationAsObject, Name:="Charts"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
End Sub

View 5 Replies View Related

ActiveX Control Can't Create Object

Jul 28, 2009

I copied a routine from this forum that would email a single sheet from a 10-sheet workbook to a recipient. This worked great for a long time, then all of a sudden I started getting the "ActiveX control can't create object" error. Here is my

View 14 Replies View Related

Error # 429 Active X Can't Create The Object

Jul 13, 2007

I am having trouble with the following code... I get error # 429 Active X can't create the object...

Dim blnIOpened As Boolean
Err.Number = 0
On Error GoTo failed
blnIOpened = False
Set MyXL = GetObject(, Excel.Application)

failed:
If Err.Number = 429 Then
Set MyXL = CreateObject(Excel.Application)
blnIOpened = True
End If

If Err.Number 429 Then
MsgBox Err.Number
End If

View 9 Replies View Related

Create Object, Work With Workbook

Oct 12, 2008

I'm trying to open a file and perform various tasks. This is the structure:

Dim xlApp As Object
Dim xlWb As Object

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWb = xlApp.Workbooks.Open(BackupFile) ' backupfile evaluates to c: esting est.xls
xlWb.Worksheets(1).Activate

Debug.Print xlWb.Worksheets.Count
Dim ws As Worksheet
For Each ws In xlWb.Worksheets
Debug.Print ws.Name
ws.Activate
Next ws
I think I'm totally missing something. The above works, except for the loop. None of the names show up in my immediate window, and none of the worksheets are activated. xlWB evaluates to nothing, which is where the problem has to be...but why would my first .Activate and Debug.Print lines work? Also, If I declare xlWb as Workbook then absolutely nothing works after the file is opened.

Basically what I want to do is open the file, do a bunch of a stuff with it, then save and close it. I have this all working without creating another object, but the opening of the file is still visible to the user. Seems like turning off ScreenUpdating doesn't truly work.

View 9 Replies View Related

Create Internet Explorer As Object

Feb 7, 2007

I want to create a macro to open a webpage, and with that webpage fill out the fields on the webpage and then hit enter and move to next record. I am having great difficulties with establishing Internet Explorer as my object and maneuvering around inside of it. My data would being in column A so i would expect to use the string below when referencing my data.

Do Until Workbooks(2).Worksheets(1). Range("A" & row) = ""

View 9 Replies View Related

Create Range Object & Pass To A Subroutine

Apr 10, 2007

Create Range Object & Pass To A Subroutine

Sub Test(ByRef objRange As Range)
objRange.Value = "Hi"
End Sub

Sub TestTheTestMethod()
With ThisWorkbook. Sheets("Sheet1")
Set objRange = .Range(.Cells(1, 1), .Cells(i - 1, 3))
objRange.Value = "Hi" 'This works fine !
Test (objRange) 'But here... Getting ERROR 424 -- Object Required
End With
End Sub

View 2 Replies View Related

Run-time Error '429' ActiveX Component Can't Create Object

Jan 26, 2010

I am trying to generate excel report output from access by click of a button. Part of the code is as follows:


Dim lngColumn As Long
Dim xlx As Object, xlw As Object, xlc As Object
Dim DBS As DAO.Database
Dim rst As DAO.Recordset
Dim blnEXCEL As Boolean, blnHeaderRow As Boolean

blnEXCEL = False

'If we do not want the first row we set Header to false
blnHeaderRow = False

'Establish an EXCEL application object
On Error Resume Next
Set xlx = GetObject(, "Excel.Application")

If Err.Number <> 0 Then
Set xlx = CreateObject("Excel.Application")
blnEXCEL = True
End If
Err.Clear

I worked on development on a server and worked fine. However when I have moved the code and database to the desktop of mine I am having
the following error in the line

Set xlx = GetObject(, "Excel.Application")

Run-time error '429'
ActiveX component can't create object

View 10 Replies View Related

Runtime Error 429 - ActiveX Component Can't Create Object

Dec 8, 2012

Following bit of code runs fine if placed in Word VBA:

Code:
Public Sub TaskUsageInExcel()
Dim tsk As Task
For Each tsk In Tasks 'Gives RTE 429 when run through Excel
Debug.Print tsk.Name
Next tsk
End Sub

So I referenced 'Microsoft Word 12.0 Object Library' in Excel and ran the code and it gave me this error 429. Noticeable part was, no instance of word was running at that time.

So I modified the code as below:

Code:
Public Sub TaskUsageInExcel2()
Dim wdApp As Word.Application
Dim tsk As Task

[Code]....

View 4 Replies View Related

Cannot Rename A Sheet To The Same Name As Another Sheet, A Referenced Object Library Or A Workbook Refernced By Visual Basic

Feb 2, 2010

I am getting the error from the title of the thread when I try to change a worksheet name.

This worksheet name doesn't already exist in the workbook and I don't have any other files currently open.

I'm not entirely sure what is causing this, but I do need the sheet to be the name I am trying to change to.

View 9 Replies View Related

Error - Number:429:' GetObject. ActiveX Component Can't Create Object

Jan 4, 2007

VBScript code snippet below is being used in an ASP page but the call to GetObject never attaches to a running instance of Excel. Since visible property is set to True, I can see the instances accumulate in the TaskBar each time the ASP page is called, so there are obviously instances to attach to.

Dim excelApp
Set excelApp = Server.GetObject(,"Excel.Application")
If (err <> 0) Then
Set excelApp = Server.CreateObject("Excel.Application")
End If
excelApp.UserControl = True
excelApp.Visible = True
excelApp = Nothing

GetObject errors out with the following error: Error - Number:429 Source:Microsoft VBScript runtime error Description:ActiveX component can't create object

View 3 Replies View Related

Conditional Circle

Nov 18, 2008

Is there anyway to create a checkbox or anything that if a condition were met, it would circle a value?

Simply put, I'm transferring an expense report from paper to excel, and this report is still entered by accounting from hard copies. The expense report requires that all credit card expenses be circled. Previously, I've created cell sized circles, left them unprotected so that they could be dragged over the credit card expense. I would like to add a checkbox somewhere that says, "Circle Expenses" or "Circle All Expenses".

View 10 Replies View Related

Draw A Circle

Apr 4, 2009

Ive been trying to draw a circle in excel, although it only draws ovals - Is there a way to draw a circle in excel?

View 9 Replies View Related

Vba Error Run-time 429 Activex Component Can't Create Object - Excel &amp; Outlook 2007

Aug 11, 2008

I have some VBA code that in one portion of it an Outlook e-mail is created and the active workbook is attached and sent. This code used to work on Excel & Outlook 2003, but now in Excel & Outlook 2007 I'm getting the error:

Run-time error '429':
ActiveX component can't create object

and is stopping on the line

Set OutApp = GetObject(, "Outlook.Application")

FY If I comment out the Set OutApp... and If OutApp.... lines and uncomment the Set OutApp create object line, I still get the same error.

Dim OutApp As Object
Dim OutMail As Object
Dim SigString As String
Dim Signature As String

'Set OutApp = CreateObject("Outlook.Application")
Set OutApp = GetObject(, "Outlook.Application")
If OutApp Is Nothing Then Set OutApp = CreateObject("Outlook.Application")

OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

View 9 Replies View Related

Drawing Circle And Rectangular Using Vba?

Sep 15, 2014

is there a code to draw a circle? by supplying the center position and the diameter? for example cell "A1" and " A2" are for the center of the circle position and "A3" for the diameter? and whats the code for drawing a rectangular by supplying the starting position and short length and the long length?

View 6 Replies View Related

Geometry Formula For Circle Calculations

May 10, 2009

See attached photo. I need a formula to calculate the length of line “c1”. I know the diameter of the circle, and the number of segments. In the photo there are 8 segments but this will change.

View 2 Replies View Related

Simple Two Circle Venn Tool

May 14, 2009

I've been look for an excel tool to draw venn diagrams with the 'circle' size in propartion to the set (population) sizes and the correct degree of intersect.
Having no luck I've made one myself - it's not pretty (the code sure is ugly) but it get's the job done.

May not work in versions earlier than xl07 - haven't been able to test

So take a look - pull it to pieces all you want.

**Warning**
Attachment contains Macros
**********

Orginal text in thread:
Silly question..but that's never held me back.

View 4 Replies View Related

Circle A Letter In Single Cell?

Jul 8, 2013

I a protected workbook I have the rows and columns indicated below. Each letter in the 2nd row is in a single cell. When completingthe entire form I want to be able to have the appropriate letter circled. I am not permitted to change this selection process to a drop down list - it must remain as formatted.

View 2 Replies View Related

Circle The Cell If The Figure Exceeds 3

Jun 9, 2008

I have 4 columns wherein the details are somewhat given below. Is there any way, wherein the figures under the column "No. of times" can be circled if it goes above 3.

Sheet1  CDEF19DateTimeMin.No. of times20Apr-0821Wed - 09-Apr-20082:42 & 2:494 & 23222Thu - 10-Apr-200803:215123Fri - 11-Apr-200810:27, 7:24 p.m., 7:39 & 7:401, 8, 1 & 12424Tue - 15-Apr-200810:26, 10:31, 10:32, 11:26 & 11:306, 2, 4, 4, 25 Excel tables to the web >> Excel Jeanie HTML 4

View 9 Replies View Related

How To Change Color Of Zero Circle In A Radar Chart

Mar 4, 2014

How do I change the color of the zero/0 circle in a radar chart (it runs from -20 to +25)?

I tried to do the adjustment through "format chart area" but seems like it's impossible to do it from there.

View 6 Replies View Related

Text In Circle Shape Based On VLOOKUP

Aug 9, 2013

I have this code and want to place text in shapes (circles).Text changes based on position in data table.

Code:

POINT_1 = Range("E" & j) * 7
NORTH = Range("E" & j) * 7

For j = 23 To 33

Dim CIRCLE_TEXT As String
CIRCLE_TEXT = Range("A" & j)

[Code] ............

View 7 Replies View Related

Need To Create A Button That Can Copy Cells, Create A New Sheet And Then Paste There

Jan 14, 2009

So I've got Sheet 1 with say

____A___B___C
1___m___i___c
2___r___o___s
3___o___f___t

I would like to create a button that can create a new sheet and paste A1 to C3 at the same location on the new sheet

and I need this to create a new sheet and do that everytime the button is pressed.....

View 11 Replies View Related

Creating Formula That Would Generate Perfect And Full Circle?

Jan 9, 2014

Creating a formula that would generate a perfect and full circle - see attached picture example. The circle needs to remain centered in the X,Y axis. Also the circle diameter will either be 1, 2, 3, or 4 units large depending on user selection.

View 1 Replies View Related

Month View Control To Locate Future Date (Or Red Circle)

May 7, 2014

I had a Calendar Control (2007) but now stuck using 2013. I have to change all of codes related to my Calendar Control to a Month View Control. Problem is I had 4 command buttons beside my calendar to automatically add value to the calendar:

My Code is in a userform. Standard code for MonthView:

[Code] ....

Basically it was “highlighting” the todays date but if one of the cmd_button was clicked then it would highlight the today’s date plus 15 (making the highlighted date, if we take today as an example: 2014/05/22).

Now with the Month View is there a way to select the exact same thing? I mean I know if I deactivate the “Show Today” in the properties but is there a way to make the selected date to have the “Circle in Red” around the date IF I click on a command button?

View 4 Replies View Related

Clear Object In Sheet

Apr 10, 2009

I have many objects in a sheet, for example Picture(from file), Oval, command button... I want to clear these objects. How can I do ?

View 3 Replies View Related

Copy Sheet & Create New Monthly Sheet From Present Sheet

Jan 12, 2010

I want to create a macro button that can create copy, insert, paste and rename the new sheet in next month's name, like if the active sheet's name is January, I want to copy the whole sheet of January, insert new sheet, paste the new sheet and rename the new sheet to next month like February?

Also rename the new sheet (February) cell B3 the same as new sheet's name (February)

So if month of February is near end, the macro button in February will create the same way as Jan did which means the next sheet will be named March and so on.

View 9 Replies View Related

Conditional Insertion Of Object In Sheet

Nov 23, 2007

I need to insert an arrow in a sheet, in a location and a direction which can be controlled by me (I don't mind hard coding the location and direction), based upon a cell value being positive, negitive or 0. I realise that it will require some code but can't find any infomation on doing anything like this through google or in the various VBA texts I own.

View 2 Replies View Related

Error Object Required When Copying Sheet

Dec 1, 2011

I have a script that creates a bunch of sheets. It was working fine when testing because I was just adding a sheet using worksheets.add, but now I've found out they all need to be created from a template sheet. I set up the template sheet and changed to the worksheets.copy method, but I'm receiving a runtime error "Object Required"

All I want to do is copy the sheet and rename it to the next name in the array (I have an array of sheet names).

Here is the code snippet in question (error line in red):

Code:

If lngX = LBound(arrSheets) Then strAfter = Sheet1.Name Else strAfter = CStr(arrSheets(lngX - 1))
Set WS = Worksheets("TmpSht_Checks").Copy(after:=Sheets(strAfter))
WS.Name = CStr(arrSheets(lngX))

As written, the duplicate sheet IS created...

I also tried the method below, but I get the same result (sheet created (but not named) and the same object required error)

Code:

If lngX = LBound(arrSheets) Then strAfter = Sheet1.Name Else strAfter = CStr(arrSheets(lngX - 1))
Worksheets("TmpSht_Checks").Copy(after:=Sheets(strAfter)).Name = CStr(arrSheets(lngX))

View 1 Replies View Related

Error Occurs While Inserting Row - Cannot Shift Object Off Sheet

Dec 7, 2011

I have very old file which contains lot of sheets. And I am unable to insert rows in any of the sheets in the file. It throws an error "Cannot shift object off sheet".

View 2 Replies View Related

Custom View Error. Cannot Shift Object Off Sheet

Jun 15, 2008

I have a very wide sheet in which I have hidden and saved seven views.I am using it for a very long time but when i did some edit work in the 'full' view,the other views are not showing. In stead I am getting the messages "cannot shift objects off sheet" and "some view settings could not be applied".This is very frustrating since a lot of patience was tested while making this wide data.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved