How To Get Rectangle Blinking Using Loop
Feb 24, 2013Ive managed to get a rectangle blinking using a do loop. But I need more than one blinking at the same time. Atm when another starts blinking the first stops.
View 2 RepliesIve managed to get a rectangle blinking using a do loop. But I need more than one blinking at the same time. Atm when another starts blinking the first stops.
View 2 Repliesi am currently working on structural engineering program in excel. i want to know if there is code for a cell to blink the value on it. like for example in cell A1, i want to put a WARNING SIGN for that. i want it to blink so that it can be noticeable. is it possible?
View 9 Replies View RelatedIf I graph a straight line and on several points on this line I want to graph rectangles, how would I calculate the corners of these rectangles.
The rectangles will not always stand 90 degrees on the line. This difference from 90 degrees is in cell L6 The direction of the line is known and the sides of each rectangle is known as well as the center of the rectangle (in meters N or S and E or W). Currently I have the direction of the line in cell L5, the long side of the rectangle in cell L3 and the short side of the rectangle in cell L4. The centers of the rectangles are in rows 1 and 2 of columns M, N, O etc. For instance cell
M1 = 450 (N) and cell M2 = 400 (E). The corners are to be calculated in reference to the values in these cells.
I have been calculating it long hand with a calculator but that takes me a long time and they tend to change things quite regularly. I have to incorporate this with macros that draw the line sition but I have that. Going clockwise from the right top around they would be called corner A, B, C and D.
how to make an object, e.g. Oval Object to flash a solid yellow & white colour? I can make blinking cells, but not objects.
View 12 Replies View RelatedUsing search i found many posts for blinking cells or flashing but i could not adapt any of them to what i need ,and since i dont know much how to, i need to blink an "Over Budget" text in cell O1, if N1 is >7000
View 9 Replies View RelatedI tried to change it to suit my need but it didn't work. I will paste here the first portion of the code that I changed
Private Sub Worksheet_Change(ByVal Target As Range)
'Test the value of the specified cell
If Target.Address = "$A$3" Then
If Target.Value >= 12 Then Call Blinker(Target)
End If
End Sub
I changed it to:
Private Sub Worksheet_Calculate()
Dim R As Range
For Each R In Range("$A$1:$A$10")
If R.Value < "$B$1" Then
Call Blinker
Exit For
End If
Next R
End Sub
As I don't have any formal education in VB editing, I don't even know that this is the correct way of doing it.
The other part of code that goes in standard module is unchanged. But I will post it here just for your ref:
Public Sub Blinker(ByVal rng As Range)
Dim myCounter As Integer
Do Until myCounter = 10
With rng.Interior
If .ColorIndex = 6 Then
.ColorIndex = xlNone
Else
.ColorIndex = 6...................
I'm working on setting up a report template for my manager, who is a very visual person. I'm trying to make certain values within the report more noticable by color change and flashing/blinking. I've been looking online for VBE code that causes flashing/blinking cells when cell conditions change. I've attempted using some code I was able to find and tried to manipulate it to fit my needs, however, I have not been able to get it to work.
I'm trying to get the text (not the background color) within a range (i.e.K11:K31) to flash continuously based on the cells value. The cells in question are linked to cells on another workbook which is updated on occasion.
Values may be as follows:
AP
F-Avoidable
F-Unavoidable
P
RC
ON
Cells in the range K11:K31 are linked to a similar cell range on another worksheet (i.e. the formula used is: =IF(Datasource1!K15=0," ",Datasource1!K15) ).
I keep running into with the code I've found are as follows:
1. Due to the values in K11:K31 being the result of a formula, the values/cells are not flashing.
2. The flashing is not continuous (i.e. everything I've found so far has a time limit). I have been able to manipulate the code to extend the amount of time the flashing occurs, but so far I've been unsuccessful in causing it to loop infinitely.
3. All of the code I've found so far causes the background rather than the text to flash (this is a minor issue, more of a preference on my part)..
I want to make a rectangle where the size of it is based on cell value.
View 9 Replies View RelatedI am trying to automate the cleaning and compiling of some data, in fact its quite a lot of data, there will be about 200,000 lines over several spreadsheets.
Determine the width of the data on spreadsheet1
Determine the rows with empty cells at the bottom of spreadsheet1
"now that I know the dimensions of this rectangle"
Copy a rectangle (with the same dimensions as the one on sheet1) of data from sheet2
And paste this rectangle into sheet1...
"This is the point of the excercise, I cannot have any gaps in the data (this includes at the end of a spreadsheet) as it needs to be a continous flow from one shreadsheet to another"
This is what I have done so far... I understand if it is laughable, I've only been doing this a couple of days.
Sub HowMuchSpace()
' No. of columns
Dim bWidthOfColumns
Range(Worksheets("Sheet1").Range(":*", ":*").Cells.SpecialCells _(xlCellTypeConstants).Count).Value = bWidthOfColumns
'No. of rows
Dim lNumOfRows
Range("*:*").Value = lNumOfRows
End Sub
When I click a button on a Sheet, Certain data is copied from another sheet and paste in active sheet. While this action is taken place, whole sheet is refreshed and the image and a data is blinking for a second.
Do we have an option to avoid that blinking ?
I already have the code to import the picture but i would like it to have rounded corner's. The option if you select the picture then tick format, picture shape and it's the second rectangle in. I can not seem to find that particular piece of code for that particular shape. The other comparison is the (reflected beveled, black) option under picture format.
[Code] .....
I have put together a simple example of my problem. There is two buttons and one text-box "TextBox 1". When I use the following code:
[Code] .........
I get one button to hide the textbox and the other to show it. Initially the textbox has the textbox properties (you can type in it) but when I hide it and show it again using the two buttons the textbox becomes like a rectangle shape which I can not type in and can only click.
How do I hide and show the text box whilst keeping it as a text box?
I want to put a length in one cell and a width in another. Then have excel draw a square/ rectangle to this size. It could just outline cells, each cell being one inch or any other way.
View 9 Replies View RelatedIs it possible to do blinking txt,
Currently in each sheet in my workbook in Cells A3:D3 I have different text bolded in Red, I want this to blink constantly while the workbook is open.
I have an autoshape rectangle which is linked to a cell on my spreadsheet. This cell will auto update whenever i type a number into a different cell (match and index formula).
I want the colour of the rectangle to be green, amber. red or black depending the value my formula brings back. I have managed to do this but the colour does not automatically update. Also when the colour goes black i will need the font in the text box to be white, at all other tines it will be black.
I want to create a button or a rectangle that has a macro attached. However I only want this button to show on the worksheet when for example A1 >=1.
View 8 Replies View Relatedhow to get rid of the blinking cursor in a text box. I made a splash screen, added a text box, increased the font size to maximum, and when I run it there is a maximum sized blinking cursor at the end of the line of text. Just looks bad on the splash screen. Is there a hide cursor command that I can use? Or is there a better way to add text that I (obviously) didn't use?
View 1 Replies View RelatedI need to add a colored rectangle or box to a page footer in 2010 Excel.
View 2 Replies View RelatedI am working with a VBA userform and several textbox's, setting SetFocus and or TabIndex doesn't leave the box ready to accept input and there is no cursor shown to indicate it is ready to accept input.
View 2 Replies View RelatedI have built a "Calculator" that requires 6 pieces of information, I'm finding that 2 pieces are consistently overlooked, is there a way to have prompts for completion "blink" to capture attention. (I'm using an If statement to highlight a pointing hand using "B" and wingdings when the selection is not completed).
I have found some code that relies on a macro being activated I would like any effects to be automated while the cell is empty and turn of "blinking" by the formula entering null when a response is entered.
With Sheets("regrade pharm_standalone")
For Each r In .Range("standaloneTerritory")
If r.Value = "X101" Then
r.EntireRow.Copy
Sheets("X101").Range("A1").End(xlDown).Offset(1).PasteSpecial xlPasteValues
End If
Next r
End With
-------------------
I need to repeat this loop for values from X101 to X151. In all cases, the sheet name is equal to the value I'm looking up (eg: value = X102 goes to sheet X102).
I have a named range called 'territories' that contains the list of X101 -> X152.
I'm hoping to make the code perform the loop for each of the territories without my having to copy & paste and change the 'X101' 51 times as this would seem a rather silly thing to do!
Macro which loops through a number of files and calls the same macro in each of them. Unfortunately when I add "Application.Run..." to the code, it no longer loops through the process and instead stops after updating the first file in the loop. If I remove the "Application.Run..." code and add any other code, the loop works fine and it continues through the process repeating all the steps for each file found.
Why it stops after one file when using "Application.Run..." to call the macros?
NB I have a list of path and file names starting in row 8 of columns A and C. Each file in the list has a macro called UpdateS1 and promoupdate1.
Sub C_Run_Loop_Macro()
Dim lastRow As Long
Dim i As Long
[Code]....
I have working code that returns a row number within a for loop based on parameters I set.
Each time the for loop runs I would like to store this row number, then after the loop has finished, delete all stored rows.
Code:
for rowNum = 1 to x (some variable end row number which I already have worked out using End(xlUp).Row)
if x = y then
*storedRow = rowNum
end if
next rowNum
*
Lines with a * are the bits I can't work out. I've been trying to understand arrays by reading posts on what other people have done, but I can't fit (or fully understand) the reDims, or reDim preserves into my code. I've seen what appear to be quite complex ways involving uBounds and LBounds, but unfortunately I can't see how to use them.
All I want is to simply keep adding a row numbers to a variable, (i.e. row 2, 5, 20, 33, 120, etc) and then delete those specific rows.
I am looping through each cell in a range and I would like to loop in reverse order.
Dim CELL As range
Dim TotalRows As Long
TotalRows = Cells(Rows.Count, 1).End(xlUp).Row
For Each CELL In Range("C1", "C" & TotalRows)
CELL.Select
'Code here to delete a row based on criteria
Next
I have tried:
For Each CELL In Range("C" & TotalRows, "C1")
and it does not make a difference. I need to loop in reverse order since what I am doing in the loop is deleting a row. I am looking at a cell and determining its value. If the value is so much, then the row gets deleted. The problem is that the next row "moves up" one row (taking the pervious cell's address) and therefore the For Each Next loop thinks it has already looked at that row.
I have some numbers in a column that I need to copy 12 times (each one) into another column. The problem is that I got like 200 records that will be converted in 15000 aprox. I've uploaded an example of what I need,
View 3 Replies View RelatedI have a workbook that contains, say, 50 worksheets: the first two worksheets summarise the data and are static in that they don't move position. However, the next four worksheets contain certain data for any given month. Each time a new month comes along, say, November, I insert four new worksheets after the two static ones as a result October's four worksheets are simply moved down the line in terms of worksheet order.
I need a macro to refer to the first six worksheets only (not the other tabs). I opted for index referencing for each worksheet, ie one - six. Now within these six worksheets in any given month, I need to sort the data by a certain column. The problem: in sheets 1,4,5 and 6 I need to rank by column E, but in sheets 2 and 3 I need to rank by column C. I have stepped through the code, which works for sheets 3-6, but doesn't seem to refer to sheets 1-2.
Sub WorksheetLoop()
'
' Loop through an indexed number of worksheets; _
' & this ensures that the worksheet range is dynamic _
' and is able to adjust when new sheets are added/removed, etc.
'
'Dim ws As Worksheet
Dim i As Long
Dim ws As Worksheet
[code]....
I've worked on a solution for this thread (http://www.excelforum.com/excel-prog...-automate.html) but have been mentally challenged with how to avoid changing the loop counter in one of the loops I have used to resort an array of file names from the getopenfile dialog.
The aim of the shown code (see post 12 of the above link for attached file) is to check if the file containing the macro is included in the array returned by getopenfile while sorting the array of file names, and if so, moving it to the end of the array for "deletion" by redimming the array to exclude the last item. This problem of the open file being selected in the dialog may never arise, but... as the OP's request in the other thread was to allow two-way comparisons between numerous files, I've considered it likely enough to test for.
Here's the code I have settled for esp between the commented lines of hash symbols, which does change the counter (see the commented exclamation marks), but prevents an infinite loop (on my second try!) by using a second boolean flag of "HasCounterBeenChanged". Is there a better way of doing this? Or, alternatively (not in my thread title), is it possible to prevent the active file being selected through one of the arguments in the getopenfilename method?
I am working on some code that loops through a column of number values. Whenever it encounters a number value and a blank cell in an offset column, it places that number value into an offset cell (forming a separate column to be compared to another column in a separate sheet). I would like to take all the values in that new column and begin placing them in a new column in a separate sheet adjacent to another table. Most of the time, these values should match the adjacent values in the separate worksheet. However, if they don't match, I would like a new row to be created for that mismatched value.
For example. This is the first worksheet. So far, my macro loops through the column with rows 1-5. It looks in the offset cell(0,2) for Isempty value and then places that value into the offset cell(0,6)
text
1
text
text
[Code]....
For Each loop can be instructed to loop starting the bottom of the range. I know that a For To Loop can handle looping from the bottom up,
Sub Filterout()
Dim c As Range
Dim rng As Range
Dim i As Long
Dim lrow As Long
Dim counter As Integer
lrow = Cells(Rows.Count, 3).End(xlUp).Row
Set rng = Range("c2:c36")
For Each c In rng
If Left(c.Value, 1) "~~" Then
c.EntireRow.Delete
End If
Next c
i have a problem with a nested loop:
it seems like the first instance of the code is running the way i want it to run, but when it starts with the second instance, it does the first search and copy, but it seems like the nested loop is being ignored.
am i doing something wrong?
dan
==========================================================
Thanks to Aaron Blood for the find_range function. i also poached the lastrow function from somewhere on ozgrid, but I cant remember the name of the poster.
==========================================================
Sub new2()
Dim Org_Area As Variant
Dim Item As Variant
Dim Copy_To1 As Variant
Dim Cell_Ref As Variant
r = 1 ..................