A
Arne Hegefors
Hi! I have a very easy sub that I use in many worksheets. I use the sub like
this: I select certain cells and then I press Alt+F8. The sub then removes
blanks that are used as thousand separators (1 000 000 becomes 1000000) so
that Excel can read the values as numbers and not as text. I need to use this
because I paste data from another program into Excel. Now I want to be able
to use this in all my workbooks. I know how to make an add-in for FUNCTIONS.
The problem is I dont know how to run my sub when saving it as an add-in. Do
I have to use a function instead? Is it possible to rewrite my sub into a
function instead? I woulöd very much appreciate help with this. Thanks alot!
Code for my sub:
Sub Makro1()
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
this: I select certain cells and then I press Alt+F8. The sub then removes
blanks that are used as thousand separators (1 000 000 becomes 1000000) so
that Excel can read the values as numbers and not as text. I need to use this
because I paste data from another program into Excel. Now I want to be able
to use this in all my workbooks. I know how to make an add-in for FUNCTIONS.
The problem is I dont know how to run my sub when saving it as an add-in. Do
I have to use a function instead? Is it possible to rewrite my sub into a
function instead? I woulöd very much appreciate help with this. Thanks alot!
Code for my sub:
Sub Makro1()
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub