Change Line Border Color Of Shape

Sep 21, 2007

I have this simple code which sets the objects format as default.

Private Sub FormatTextBox()
ActiveSheet.Shapes("FormatBox").Select
Selection.ShapeRange.SetShapesDefaultProperties
End Sub

Is there a way to set an objects shape to the default format...not as default?

ie: if the default line color is blue. what code could i use to set an object with a black line color, to the default blue?

View 3 Replies


ADVERTISEMENT

Search Unopen Sheet For Value / Change Color Of Line / Copy Line Paste?

Nov 17, 2012

Our small family business has a mailing campaign that we track with excel. However, we're very concerned about users opening the macro-filled master spreadsheet. Instead, we'd like a macro to do everything for them.

When a letter comes back in the mail with a bad address, the user types the Street number and street name such as "1234 Main St" into $A2 of c:dropbox eturned.xlsm, presses the macro button, and it should do the following:

Opens and Searches "Sheet1", "column S", in the file c:dropboxmaster1.xlsm, and finds the LAST instance of the address typed.Selects that entire rowCopies the entire row.Pastes the contents into the row of the active cell in the destination spreadsheet, overwriting what was there before. Such as $2:$2 if the address was typed in $A2.In the master1.xlsm spreadsheet, sets the entire copied row color to "gray".closes master1.xlsm and saves changes.

The end result is that the user now has an identical row of information in their spreadsheet, and the master spreadsheet's row is colored gray indicating it has been completed.

Other notes:I'm open to more efficient steps than this if you have them.There are approx 5,000 records to search through in master1.xlsx at any given time.

View 5 Replies View Related

Change Textbox Border Color - Visible Or Hidden

Mar 8, 2012

What command I would use to change the text box border color, and set text border to visible or hidden?

View 3 Replies View Related

Change Color Of A Shape With Click

Oct 8, 2009

what i am trying to do is toggle the color of a shape between red and green. what i have currently (courtesy of a search on this site) is this macro:

View 9 Replies View Related

Find Specific Phrase In A Column And Change The Row Color And Its Border

Mar 27, 2014

I have the table, as shown on left in the appended image, and the final result should be the right one.

The steps are written as 1, 2, 3 and 4.

Untitled.png

View 13 Replies View Related

Change Columns Fill Or Border Color Based On Current Date

Aug 21, 2014

I have a simple spreadsheet. A column for a persons name and 31 columns, one for each day of the month. I want to apply conditional formatting, either fill color or border color, to the date column of the current date when the spreadsheet is opened.

View 2 Replies View Related

Change Shape Color Based On Combo Box Selection

Aug 7, 2007

I am trying to use a userform ( Combo Box) to update my named cell "Aircraft1" then based on the value selected change the color of an object.

The code works great if I manually enter the value in the cell "Aircraft1", however if the dropdown list selects the value the object does not update its color.

Is there a way to update the cell via a combo box, and then have the VB code change the color of the object?

This is my

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("Aircraft1")) Is Nothing Then Exit Sub
ActiveSheet.Shapes("Arrow1").Select

With Range("Aircraft1")

If .Value = 1 Then
ActiveSheet.Shapes("Arrow1").Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 17

View 5 Replies View Related

Border Around Range To Form Shape

Apr 12, 2008

For my university coursework I've created a comprehensive building cost model but I'm struggling with one aspect, copying the plotted ground floor footprint to enable floor finishes to be selected. A user can plot shapes in a 50x50 grid (B2:AY51). The shapes are displayed using conditional formatting. All shapes are conditionally formatted red, i.e. colour index 3. I wish to place a border around the plotted shapes, so that I can then copy the outline to a new tab. e.g. Range B2:AY51, If cell conditonally formatted red then place borders to the sides of the that cell that share a boundary with a non-conditonally formatted red cell.

View 3 Replies View Related

Change Comment Line Color

Feb 12, 2012

The comment lines in Exel VBA editor is green by default, is it possible to change the color?

View 2 Replies View Related

How To Change PowerPoint Textbox Line Color Using Excel VBA

Mar 7, 2014

I've created a powerpoint with a number of slides, and I need to put a textbox at the bottom. I want to change the colour of the textbox border colour.

Code:
For intCount = 1 To 5
Set tmpTxtBox = pptApp.ActivePresentation.Slides(intCount).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=120, Top:=500, Width:=500, Height:=100).TextFrame.TextRange
tmpTxtBox.Text = strTolerance
tmpTxtBox.Font.Name = "Arial"
tmpTxtBox.Font.Size = 12
tmpTxtBox.Font.Size = 12
tmpTxtBox.ParagraphFormat.Alignment = ppAlignCenter
' ??? tmpTxtBox.Line.ForeColor = RGB(255, 0, 0)
Next intCount

I've tried everything I can think of for that line with the ??? in, .line.color, .color, .bordercolor but Excel VBA doesn't like any of them , I get error 438 'object doesn't support this property or method'.

View 2 Replies View Related

Add A Textbox At The Current Position (selected Cell) With A Set Size, Fill Color, And Border Color

Nov 2, 2008

I'm trying to add a textbox at the current position (selected cell) with a set size, fill color, and border color. I found this: http://msdn.microsoft.com/en-us/libr...8(VS.80).aspx:

View 2 Replies View Related

Change Shape Text Without Selecting Shape

Mar 4, 2009

when i run the below code i get an error 438 'object doesnt support this property or method'

View 2 Replies View Related

Draw A Border Using Line?

Aug 14, 2013

I'm trying to use VBA to draw a border using the drawing toolbar and using the line. i need it to draw a border around a select area i hightlight.

i have attached a example below, but not sure if it will appear.

View 1 Replies View Related

Single Line Border Around A Cell - VBA

Apr 16, 2012

Why is the VBA for putting a simple border around a cell so convoluted. For example cell A2:

Code:
Sub CellBorder()
Range("A2").Select
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin

[Code] ........

So many lines to put a simple - single line border (square) around a cell.

View 3 Replies View Related

Add Border Line Dependent On Condition

May 5, 2013

I am trying to add several border lines to the bottom of a row from A to AI start from row 12.

There is probably a few things you need to know

1. Starting from row 11 each data section is two rows deep

2. The data section could be repeated and if this is the case do not insert border until it changes

3. The border line needs to be added underneath the second line i.e. to split the different types of data

View 5 Replies View Related

Macro To Set Border Line Styles

Jan 26, 2007

I have a range of data (not a named range, just a selection) and I typically want:

- the top 2 rows to have a heavy border on the left, top and right sides with a light line on the bottom.

- On the bottom line, I need a heavy line on the left, bottom and right sides.

- The body in between needs to have heavy lines on the left and right sides with dots for all in between.

The top 2 lines show titles, the bottom line is for totals and the body in between shows the data.

I've made 3 separate macros that do each part but I'm hoping that they can be integrated into one.

View 9 Replies View Related

Excel 2003 :: Border Line Styles Not Working

May 20, 2012

(Excel 2003, using Format/Cells)

I have selected a range of multiple rows and columns. I can change the alignment, cell color, where border lines appear, and the color of border lines.

However, I can not change the border line style. No matter what style I select, when drawn on the sheet it apppear as a thin solid line. I've tried all the dashed/dotted line options, but they appear to have no effect.

Ultimately, I want to color alternating rows of cells, and (since coloring hides grid lines) I want to add border lines the same color and style as the hidden grid lines.

View 2 Replies View Related

VBA - Adding Border Line To Bottom Row Of Set Print Area

Oct 15, 2009

I am using the following macro to set print area which I found on the net. I am trying to modify it as I would also like to place a border line on the bottom row but cant find anything to assist me despite searching through several threads.

Dim myrange As String
With ActiveSheet.Range("A:A")
myrange = .Find(What:="*", After:=.Range("A1"), LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Address
End With
ActiveSheet.PageSetup.PrintArea = "$K$1:" & myrange
End Sub

View 9 Replies View Related

Excel 2007 :: Removing Border Line From Camera Shot

Dec 1, 2013

The title in the attached chart is a camera shot transferred from another excel 2007 worksheet in the same workbook.

I'd like to remove the border line, I've tried right clicking... then format picture ...no dialogue box comes up. I've scrolled through all the commands in the ribbon + non ribbon commands and can't find anything that seems appropriate that's not greyed out ....

border line.docx‎

View 7 Replies View Related

Move A Shape In A Straight Line Between 2 Cells

Sep 24, 2008

if I wanted to slowly move a shape (small circle) in a straight line between cells R20 & W7.

The straightest line possible is by drawing an arrow line between the 2 cells.

Is there a way to then use this arrow as a guide for moving the shape?

In other words, would it make sense for the porgram to draw a transparent line between the cells, and use that line as a "path" along which to move the shape?

I just don't know if this is worth the trouble.

View 9 Replies View Related

VB Border Color Code

Nov 6, 2007

part of my code looks like this. Instead of it being if c.interior.colorindex i want it to be if top border color = 4.

How do i syntax this?

For Each c In Worksheets("Sheet1").Range("B7:DE7").Cells
If c.Interior.ColorIndex = 4 Then Range("DH7").Value = Range("DH7").Value + c.Value
Also, is there a way to specify Range("DH") and make the row be the current row, not hard coded to 7

View 9 Replies View Related

Track Progress Via Adding Length To Line Shape

Feb 23, 2008

I am currently working on an excel file in which we track progress through the use of an autoshape line. Everytime the progress needs to be changed the line must manually be resized. I am using buttons with macros and trying to add a certain length to the line. So far I have been using the following

Sub line()

ActiveSheet.Shapes("AutoShape 80").Select
Selection.ShapeRange.IncrementLeft 28.5

End Sub

This code resizes the line by adding a percentage of the line length to the line. I want to be able to add the same length everytime.

View 5 Replies View Related

Format Border Color Based On Value

Nov 1, 2007

I found this code (compliments of Andy Pope) which fills a background color based on its corresponding cell value. (then offsets all uniformly)

View 9 Replies View Related

Default Border Color Index

Jun 18, 2009

When I launch excel 2007, i have cells with a grey border. I'm not sure what the colorindex is of this border.

Through a macro, when I format cells, I use

Cells(x,y).BorderAround ColorIndex:=xlAutomatic

xlAutomatic points to BLACK by default. Could someone tell me how I could reference the actual default colorindex (the grey one which seems to border all other cells, while not being xlAutomatic)?

View 2 Replies View Related

Background Color And Border Around Macro

Aug 6, 2008

I am trying to develop an Excel spread- sheet by using some macros. In detail, in my first worksheet, I have something like -

Exp1 ....
Exp2 ....
Exp3 ....
:
:
:
Expn ....

This rows are coming from another worksheet and I have used a macro (developed by me) to populate these rows. Even the number of rows to be populated is not fixed.
However, I would like to add one row with text - " Total Expense" after those rows. This row will have some background color - say Tan - and font color - say Green - and also a border around its own - in nature, the border will be thick, Double and with color Rose. I have tried the following code in macro but not working properly -

Sub Include_Fields_n_Format(loc As String)
tot_exp_scell = loc & f_scell
tot_exp_ecell = loc & (f_scell + 1)
Range(tot_exp_scell, tot_exp_ecell). Merge
Range(tot_exp_scell, tot_exp_ecell).WrapText = True

Range(tot_exp_scell, tot_exp_ecell).Interior.Color = RGB(150, 150, 150)
With Range(tot_exp_scell, tot_exp_ecell).Font...................

View 4 Replies View Related

Border Color Issue In Excel 2003

Jan 6, 2009

I am trying to assign a border and fill to cells, of identical colors, using VBA. Simple enough, yes? I am using the same RGB value for both the fill and the border, but in Excel 2003, they are assigned two different colors: the fill is the correct shade, but the border is not, which makes absolutely no sense to me. I could understand if both colors were slightly off from the shade I'm getting in 2007, but to have one be correct and the other not? I can manually assign the border to be the proper color, but this doesn't help.

The code is:

View 14 Replies View Related

Toggle Shape Color

May 31, 2007

I am trying to write a macro so that when you click a circle shape it will fill it black and then when you click again it will go back to no fill. Like the option button but is not linked to any other one. So it should just work like a check box but I need it to be a circle.

View 4 Replies View Related

Color Individual Lines Of Shape Group

Feb 3, 2008

The group behaves as one shape alright when, say, coloring the line, but is not "fillable". Below a simple sample. - The custom shape i am trying to color in is not a simple square or rectangle -not anything from the existing MS shapes that is....

View 6 Replies View Related

Xl 07 Can't Change Border Colour

Jan 16, 2009

I am using Excel 2007. One of my worksheets has a dark border around some cells. Instead of being blue the lines are black. I used the right click and format cells option but it does not work.

View 10 Replies View Related

How To Change Type Of Border

Apr 24, 2014

How can I modify this code:

HTML Code: 

Sub aaanewa()
Dim lRow As Long, c As Range
lRow = Cells(Rows.Count, "D").End(xlUp).Row
For Each c In Range("D1:D" & lRow)
If c.Value > "" Then

[Code]...

To include this:

HTML Code: 

With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ThemeColor = 1
.TintAndShade = -0.14996795556505
.Weight = xlThin
End With

so i can change the color and size of border

View 2 Replies View Related







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