Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default Line Insert recall by name

H!!

Is it possible to name the below code extract and recall it by the name?

Rows("5:5").Select
Selection.Insert Shift:=xlDown
Range("A5:M5").Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A5").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With

Thanks in advance

Darren

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200609/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Line Insert recall by name

Sub insertrow(rownum)
Rows(rownum).Select
Selection.Insert Shift:=xlDown
Range("A" & rownum & ":M" & rownum).Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A" & rownum).Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With
End Sub

Usage:
Sub insteszt()
rowvar=5
Call insertrow(rowvar)
End Sub

Regards,
Stefi


€˛FIRSTROUNDKO via OfficeKB.com€¯ ezt Ć*rta:

H!!

Is it possible to name the below code extract and recall it by the name?

Rows("5:5").Select
Selection.Insert Shift:=xlDown
Range("A5:M5").Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A5").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With

Thanks in advance

Darren

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200609/1


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Line Insert recall by name

Function ChangeCells()
Rows("5:5").Insert Shift:=xlDown
Range("A5:M5").NumberFormat = "0.00"
Range("A5:M5").Interior.ColorIndex = xlNone
With Range("A5")
.MergeCells = False
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.Interior.ColorIndex = 15
End With
End Function

Sub DoStuff()
'lots of stuff
Call ChangeCells
'do more stuff
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"FIRSTROUNDKO via OfficeKB.com" <u15639@uwe
wrote in message
H!!
Is it possible to name the below code extract and recall it by the name?

Rows("5:5").Select
Selection.Insert Shift:=xlDown
Range("A5:M5").Select
Selection.NumberFormat = "0.00"
Selection.Interior.ColorIndex = xlNone
Range("A5").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
.Interior.ColorIndex = 15
End With

Thanks in advance
Darren

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set-up gage calibration recall by date jeo Excel Discussion (Misc queries) 0 January 20th 09 09:49 PM
recall cell value in hyperlink bc84 Excel Worksheet Functions 2 February 6th 08 10:30 PM
How can i Recall a Value? Gmata Excel Worksheet Functions 1 November 25th 07 01:12 AM
recall records evgny[_2_] Excel Programming 0 December 20th 05 05:35 PM
UserForm Recall Problem Andy Tallent Excel Discussion (Misc queries) 1 April 15th 05 06:14 PM


All times are GMT +1. The time now is 08:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"