J
John
Hello.
I have a macro in excel which changes all the numbers in column a to
different numbers.
For example it turns the numbers 100 to 500 into 1000 to 5000.
This is an example of the macro.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 14/12/2003 by John
'
' Keyboard Shortcut: Ctrl+k
'
Columns(1).Replace What:="100", Replacement:="1000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="200", Replacement:="2000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="300", Replacement:="3000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="400", Replacement:="4000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="500", Replacement:="5000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
If I want to add my own icon to the toolbar in excel so that whenever
I click the icon it runs the macro, do you know how I can do this and
add it in?
Are the excel icons in the toolbar the same as the .ico files or are
they different?
Thanks very much for any help on how to do this.
John
I have a macro in excel which changes all the numbers in column a to
different numbers.
For example it turns the numbers 100 to 500 into 1000 to 5000.
This is an example of the macro.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 14/12/2003 by John
'
' Keyboard Shortcut: Ctrl+k
'
Columns(1).Replace What:="100", Replacement:="1000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="200", Replacement:="2000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="300", Replacement:="3000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="400", Replacement:="4000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Columns(1).Replace What:="500", Replacement:="5000",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End Sub
If I want to add my own icon to the toolbar in excel so that whenever
I click the icon it runs the macro, do you know how I can do this and
add it in?
Are the excel icons in the toolbar the same as the .ico files or are
they different?
Thanks very much for any help on how to do this.
John