Scripting Objects
Mar 22, 2007
If I hadn't read it on here, how would I have know that they existed? They are not mentioned in the standard Excel help files (not that I could see anyway).
What other "objects" are available? I had a look through the references in the VBE and there are literally hundreds on items which all look pretty "juicy". Does that mean there are a whole host of other objects that I could use in my Excel spreadsheets to either make them simplier or more powerful?
If so, where does one find any reference info on them?
View 3 Replies
ADVERTISEMENT
Dec 27, 2013
So I'm creating a grid worksheet for engineering calculations and I have a couple questions about the best way to do it. I've been messing with excel for my calcs for about a decade now, and I every once in a while I try and improve them.
First: I will have several input areas that will either be colored text or shaded background (either works for me). I don't want these 'input required' objects to print as color, just black. But I want my logo at the sheet top to print as color. I've only found ways to not print any color. Can I print the logo as color and the 'input required' stuff as black?
Second: When I do calcs by hand, I write them out on 10x10 grid paper. Each 10x10 grid is one inch. In the past I've created this grid out of the cells, which works. I frequently need to change formulas around though, and each time I do this, I end up needing to mess with the grid cells also. Is there a way to create the grid and have it in the background so it doesn't need to be adjusted each time I change formulas? I wan't the grids to print, and also want to see them on the screen, as I sometimes draw simple objects along with the formulas.
View 9 Replies
View Related
Feb 23, 2010
When we should use scripting dictionary?
Any website recommendation on the net with a good explanation about this, related to use it in excel?
View 9 Replies
View Related
Nov 27, 2011
I have been tasked with doing a retail over/short Spreadsheet. The spreadsheet will be 13 tabs with 12 being the months and the 13th being the yearly summary. On each sheet will be the cashiers name.
I need to be able to script the addition of a new cashier and have them added alphabetically to all 13 sheets and at the same time keep all currently entered information with the appropriate person
End user only wants to use Excel
View 1 Replies
View Related
Nov 10, 2009
The code works well. Though there are a few that that i dont understand.
The same range in used for the listbox and the combobox. Though i cannot send the Variable Rng through the scripting dictonary it seams that this function is looking at the range in a diffrent manner to a standard range.
so you see i have another variable datarng for use in the function though if i use set to set the variable as the range it wont like that either.
View 8 Replies
View Related
Aug 24, 2006
Folder File List VBA Code Error
which is something that I am wanting to use in my spreadsheet.
When using this, i get a compile error on:
FSO As Scripting.FileSystemObject
The code I am using is the following:...
View 8 Replies
View Related
Feb 13, 2014
I have date values in a range of cells, and have named the range "ChangeRange".
How would I:
1. loop through the range to store the current value of each cell in a scripting directory?
2. use vba to compare the values in that dictionary to the current value of the cell when it changes (NOTE: the change is by formula, not by manual insertion of a new value?
3. write that old cell value in the cell immediately to the right of the cell when it changes and update the dictionary value with the "new" old value?
4. do this for more than one range of dates on the same page?
View 2 Replies
View Related
Dec 16, 2008
Can I use my listbox contents to populate a scripting dictionary?
Dim a, z As Long
Set dic = CreateObject("scripting.dictionary")
With Sheets("Changes")
a = ListBox1.List
'a = .Range("b1", .Range("b" & Rows.Count).End(xlUp)).Offset(, -1).Resize(, 10).Value
End With
For z = 2 To UBound(a, 1)
If Not dic.exists(a(z, 2)) Then
ReDim w(1 To 10, 1 To 1)
For zz = 1 To 10: w(zz, 1) = a(z, zz): Next
dic.Add a(z, 2), w
Else
w = dic(a(z, 2))
ReDim Preserve w(1 To 10, 1 To UBound(w, 2) + 1)
For zz = 1 To 10: w(zz, UBound(w, 2)) = a(z, zz): Next
dic(a(z, 2)) = w
End If
Next
ComboBox2.List = dic.keys
ComboBox2.Value = Sheets("Calendar").Range("E3").Value
This code doesn't work because the bold line falls over.... the Remmed statement below it works fine though...
View 9 Replies
View Related
Aug 4, 2009
removing duplicates from a the first column of a two column table while maintaining the data in the second column. Unfortunately my skills fall short and I have been unable to alter the code to work for a 5 column table.
For example, if I might have data that might look something similar to this: ....
View 10 Replies
View Related
May 20, 2007
Is there a way that this can be coded so that when the workbook opens up it turns on the reference to the Microsoft Scripting Runtime library?
View 9 Replies
View Related
Mar 23, 2014
I have a spreadsheet with 2 tabs:
AllData:
Name
Data
Read1
[Code]....
View 9 Replies
View Related
Jul 15, 2008
I want to use VBA to update a drawing object's color, such as a circle.
For example, pretend I am counting sheep and I need to know when I have reached the maximum count by the visual aide of a stoplight. The script in my head reads: If the max. count of the sheep is less than 5, then the stoplight is green. If the max. count of the sheep is equal to 5, then the stoplight is yellow. If the max. count of the sheep is greater than 5, then the stoplight is red.
Is there a way to do such a thing on excel and with VBA?
View 9 Replies
View Related
Jun 29, 2006
I created four Ranges called "Range1", "Range2", "Range3" and "Range4", and wrote short program, that fills them:
Dim i As Integer
For i = 1 To 4
Range("Range" & i).value = 1
Next i
Is it possible to do similiar thing with for example ComboBox?
Let's say that i have comboBoxes named "cb1", "cb2", "cb3" and "cb4" and want to disable them.
View 9 Replies
View Related
Jan 26, 2007
I ran into some difficulties by calling an object's function from a collection.
'BondIndex Class Module
Option Explicit
Private m_BondReturn As Collection
Public Sub Initialize()
Set m_BondReturn = New Collection
End Sub
Public Sub Load(BondPoints As Integer)
Dim i As Integer
Initialize
'Load Parameters of Bond
End Sub
Property Get BondReturn() As Collection
Set BondReturn = m_BondReturn
End Property................................
View 2 Replies
View Related
Dec 21, 2007
Why should I set objects to nothing (ie clear them) just before ending a sub routine? Doesn't excel dump the variables after the sub is finished running?
Example:
Dim ws As worksheet
Then at the end...
Set ws = Nothing
View 3 Replies
View Related
Dec 31, 2009
In the attached sample workbook, (Excel 2007 format), there are hundreds, maybe thousands, of drawing objects and rectangles. They are mostly located near the top of column AC. You can't see any of them, because they are empty, or formatted to have no line and no fill, ubt if you move the cursor around in that area, it will eventually give you the option to "select" one of the objects. They appear to be stacked on top of each other.
This bloats the worksheet terribly. I have managed to shave the size of the attached sample down to 100K, bu deleting about 200 of the objects, but if I save this balnk file as an Excel 2003 file, it is 1.3 Mb.
I have discovered how to show what objects are on the worksheet, by selecting "Find and Select" and choosing to show the "Selection Pane". This pane shows hundreds of blank objects in the sheet. When this pane is open, however, if I try to select and delete an object, Excel locks up on me.
View 5 Replies
View Related
Feb 5, 2013
I'm not sure why they decided to export data this way but...I have a report that has pictures/objects that need to be in a cell so I can manipulate the data. I'm not really sure how to do this- and the only thread that related to this was over my head. This is not the original export- I've already done some sorting so the objects are all over the place- but basically if the object is C (picture 23) then I want that picture to say C in a cell somewhere. or if the picture is the dollar sign (picture 27) then I want a cell to say $. I don't know if I'm even explaining this right. Here is my workbook.
View 6 Replies
View Related
Jan 23, 2014
Is it possible to change colour of an object (Fill) say fill circle Red when A1="1" and Green when A1="0"
View 12 Replies
View Related
Jan 24, 2008
I manually Copied and Pasted contains in TXT File.
The TXT file is as below.
It has only 1 Column
7AB/9AB
8AB/10AB
7CA/10CA
7BB/10BB
7CB/10CB
7AA/9AA
What I want is to run some VB Script so that anything after / is ignored
and the Output shold be reformatted as below
7A1
8A1
7C0
7B1
7C1
7A0
The Above O/p is anything aftyer / is ignore and the last character of the 1st field is A is replace with 0 and B is replace with 1.
View 13 Replies
View Related
Dec 29, 2008
Hi all, starting this as a new problem because it's so far different from what I was originally talking about; but this does relate in part to my previous thread.
Anyway. I'm trying to set an array to set Range objects so that I can define each one as a seperate With block. Here's what I "know" when starting out.
I developed the following. I keep thinking it should be multidimensional but my sleep deprived brain came up with this instead. The problem is, it's throwing a 1004 Method "Range of object '_Worksheet'" failed at the With statement.
View 6 Replies
View Related
Jan 10, 2012
I have a Master sheet linked with another worksheets with formula.
Now I want to insert 1 column in between , and when trying to insert the column in it a message sowing that " Cannot Shift Objects of Sheet"
Why this error shwoing and how can i insert any column in it.
View 7 Replies
View Related
Apr 23, 2007
Here is the Sheet so far: ...
View 9 Replies
View Related
Jul 24, 2007
I have a range of cells I want to copy which has some textboxes and check boxes in it. When I do a copy/insert cells in vba it only copies the cells and their values but not any of the boxes.
.Range(.Cells(Origin.Row + 1, Origin.Column), .Cells(Origin.Row + 12, Origin.Column + 10)).EntireRow.Copy
.Range(.Cells(Ind.Row, 3), .Cells(Ind.Row, 3)).EntireRow.Insert Shift:=xlDown
View 9 Replies
View Related
Aug 9, 2007
If cell.value = {userArray} and cell.offset(0, 2).value = {taskArray}
Then cell.offset(0, 2).interior.colorindex = 3
I have three different {userArray}s and {taskArray}s and there will essentially be different code for each of the arrays and that's fine....
View 9 Replies
View Related
Aug 24, 2007
I'm trying to remove gif, jpg, and xls objects from a specific range and I can't seem to figure out how to do it. I can remove all objects from the sheet or only the gif and jpg files from a range. Here is the code I've been playing with:
Sub Clear_Sigs()
Dim Sh As Shape
With Worksheets("Sheet1")
For Each Sh In .Shapes
If Not Application.Intersect(Sh.TopLeftCell, .Range("A26:E32")) Is Nothing Then
If Sh.Type = msoPicture Then Sh.Delete
End If
Next Sh
End With
End Sub
I know this code says to delete only pictures and I've tried tweeking it to do all objects but it doesn't work for just the range I want. Any help is appreciated.
Thanks,
Amy
View 9 Replies
View Related
Sep 28, 2007
I want on my chart is an object (Arrow in this case), that is conditional formatted on data between 2 periods.
The first bar of 20 represents a top 20 list with most common failures.
I would like to have an arrow that indicates that if the last period, the amount of failures has gone up, down or is equal to the period before that.
So period 1, article 111 had 10 failures, period 2 article 111 had 20 failures, hence there should be an arrow pointing up related to that bar.
View 9 Replies
View Related
Jul 11, 2008
I have a code which i use to grab the highest price and the lowest price from various sheets in column D.
There are 19 sheets altogether and the code basically looks at the relevant sheet based on the value in another cell.
Example - if you type value "EUR/USD" then the highest price and the lowest price are taken from the sheet named "EURUSD".
Now - HOW can i HIDE all those 19 sheets without getting the visible object error?
View 9 Replies
View Related
Jul 16, 2008
I have a userform which interfaces with a worksheet as a "front end" and includes a GetData macro that retrieves the relevant data from the worksheet based on the ContractNum value keyed into the ContractNum text box on the form as follows (in part): ...
View 9 Replies
View Related
Apr 14, 2009
I have a lot of named objects (Pictures and AutoShapes) on Sheet1 and I need a list of their names in Sheet2!A1.
View 9 Replies
View Related
Jun 2, 2009
I have two excel files saved on the network. Test1.xls and Test2.xls. Test1 is the source and test2 is the destination.
When i update a cell in test1, this cell is referenced in test2 - so anybody who opens test2 will see the data i changed in test1.
Here's my problem. I need a way to manually update the cell in test2 without having to close and reopen Excel.
Only opening and closing Excel will ask me if i wish to update the data.
How do i force manual update?
Below is the link in test2 using Excel 2003.
='\servernameshare[test1.xls]Sheet1'!$A$1
View 9 Replies
View Related