![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
In the code below I need to make For all you needs - contact Brian" read and bold also I nee to link it to a html page - please help
Sub Insert10() ' ' Insert10 Macro ' Macro recorded 3/9/2002 by David Lisowski ' ' Keyboard Shortcut: Ctrl+i ' Position = 10 Count = 0 RangeString = "A0" Do While Count < 100 RangeString = "A" & Position Range(RangeString).Select Application.CutCopyMode = False Selection.EntireRow.Insert ActiveCell.FormulaR1C1 = "For all you needs - contact Brian" Position = Position + 10 Count = Count + 1 Loop End Sub |
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Howdy. Not sure if you meant that you wanted the text red or not....But you could try the following:
Sub Insert10() ' Keyboard Shortcut: Ctrl+i Position = 10 Count = 0 RangeString = "A0" Do While Count < 100 RangeString = "A" & Position Range(RangeString).Select Application.CutCopyMode = False Selection.EntireRow.Insert ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _ "mailto:Brian@yahoo.com", TextToDisplay:="For all of your needs, Contact Brian" Selection.Font.Bold = True 'Selection.Font.ColorIndex = 3 'remove apostrophe at beg of line for red text Position = Position + 10 Count = Count + 1 Loop End Sub I made the link an e-mail address. Change address and text where appropriate. You can change the "mailto:blah" to "http://blah" Hope this helps. Cheers, Nate [ This Message was edited by: NateO on 2002-03-11 17:28 ] |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Hey Nate, won't this default to Excel's hyperlink font - blue and underlined? I changed the default hyperlink format in my code (see
http://www.mrexcel.com/board/viewtop...1977&forum=2&2 ) Best regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
#4 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
It didn't for me....You? Yeah, I saw your post when I realized there's a plethora of them out there.....In any case Xl 2000 and I are getting along...Have a good eve.
Cheers, Nate [ This Message was edited by: NateO on 2002-03-11 17:43 ] |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#6 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Apparently a little more user friendly....Looking forward to 2002, planning on switching msgbox with speak.
Pretty similar tools though. Cheers, Nate |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|