Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA keyboard action, formatt no, no info windows


Below is my code, I hope someone can help me edit it. Also I am having
the following problems:

-Keyboard shortcut is not working
-I also do not want the excel windows (info windows saying things like
looking for the header row) to not show up. Thanks!


Code:
--------------------


Sub NewMo()
'
' NewMo Macro
'
' Keyboard Shortcut: Ctrl+z
'
Range("C2").Select
Selection.EntireColumn.Insert
ActiveCell.FormulaR1C1 = "=REPLACE(RC[1],3,4,"""")"
Range("C3").Select
ActiveWindow.SmallScroll ToRight:=1
Range("M2").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""-"",(RC[-2]*-1),RC[-2])"
Range("M2").Select
Selection.AutoFill Destination:=Range("M2:M500"), Type:=xlFillDefault
Range("M2:M500").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
Range("C2").Select
Selection.AutoFill Destination:=Range("C2:C500"), Type:=xlFillDefault
Range("C2:C500").Select
ActiveWindow.ScrollRow = 1
Range("A2").Select
Selection.EntireRow.Insert
Selection.EntireRow.Insert
Range("A3:M3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A3").Select
ActiveCell.FormulaR1C1 = "FUND"
Range("B3").Select
ActiveCell.FormulaR1C1 = "CENTER"
Range("C3").Select
ActiveCell.FormulaR1C1 = "DEPT/CHAR"
Range("D3").Select
ActiveCell.FormulaR1C1 = "ACCOUNT"
Range("E3").Select
ActiveCell.FormulaR1C1 = "DESC"
Range("F3").Select
ActiveCell.FormulaR1C1 = "Revised Budget"
Range("G3").Select
ActiveCell.FormulaR1C1 = "Current Mo"
Range("H3").Select
ActiveCell.FormulaR1C1 = "YTD"
Range("I3").Select
ActiveCell.FormulaR1C1 = "Encum"
Range("J3").Select
ActiveCell.FormulaR1C1 = "Comm"
Range("K3").Select
ActiveCell.FormulaR1C1 = "Avail Balance"
Range("A4").Select
ActiveWindow.SmallScroll ToRight:=3
Range("M3").Select
ActiveCell.FormulaR1C1 = "Avail Balance"
Range("M4").Select
ActiveWindow.ScrollColumn = 1
Range("A3").Select
Selection.Sort Key1:=Range("B4"), Order1:=xlAscending, Key2:=Range("C4") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:=False _
, Orientation:=xlTopToBottom
Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(6, 7, 8, 9, _
10, 13), Replace:=True, PageBreaks:=False, SummaryBelowData:=False
Range("A4:M636").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=RIGHT($C1,8)=""Total"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=RIGHT($A1,8)=""Total"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=RIGHT($A4,8)=""Total"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=RIGHT($C4,8)=""Total"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=RIGHT($C4,5)=""Total"""
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
End With
Selection.FormatConditions(1).Interior.ColorIndex = 15
Rows("3:3").Select
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.ShrinkToFit = True
.MergeCells = Falseb
End With

End Sub




--------------------


--
ineedhelp2
------------------------------------------------------------------------
ineedhelp2's Profile: http://www.excelforum.com/member.php...o&userid=26298
View this thread: http://www.excelforum.com/showthread...hreadid=395787

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA keyboard action, formatt no, no info windows


Can anyone help me with this?


--
ineedhelp2
------------------------------------------------------------------------
ineedhelp2's Profile: http://www.excelforum.com/member.php...o&userid=26298
View this thread: http://www.excelforum.com/showthread...hreadid=395787

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
need to convert e-mail info from excel spreadsheet ot windows XP merlinus Excel Discussion (Misc queries) 1 December 28th 05 03:04 PM
keyboard shortcut for moving between windows c_new Excel Discussion (Misc queries) 7 October 11th 05 04:31 PM
File info from Windows Explorer to Excel? Wordgeek Excel Discussion (Misc queries) 1 September 15th 05 02:58 PM
COM Add-ins and Keyboard Hooks/Child Windows Gareth[_5_] Excel Programming 0 April 5th 04 10:31 AM
Keyboard shortcut for Maximizing Windows SuperJas Excel Programming 2 March 2nd 04 05:41 AM


All times are GMT +1. The time now is 11:27 AM.

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"