Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

I used to activate the below macro via a control button for changing column
E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a worksheet. But it ain't
working recently. Any ideas why? (p.s. : recently u/g to WinXL from Win98).
=================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
if you have real dates in this column you should change the number
format. try
Columns("E:E").numberformat = "DD/MM/YYYY"

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
I used to activate the below macro via a control button for changing
column E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a
worksheet. But it ain't working recently. Any ideas why? (p.s. :
recently u/g to WinXL from Win98). =================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Hi Frank,
Unfortunately that didn't effect anything. I checked the original format of
data in my column E:E and confirm that they are in "gg/aa/yyyy" format
(correct date format for my friend: format in Turkish language). And I am a
bit confused why I should be using "numberformat" in code?
TIA

"Frank Kabel" wrote in message
...
Hi
if you have real dates in this column you should change the number
format. try
Columns("E:E").numberformat = "DD/MM/YYYY"

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
I used to activate the below macro via a control button for changing
column E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a
worksheet. But it ain't working recently. Any ideas why? (p.s. :
recently u/g to WinXL from Win98). =================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
a date format is a number format. So if you have stored your dates as
real date values you only change the format of the cell. Trying to
replace the delimiters won't work as they're just a format (and not
really within the cell).
Also you don't have to change the format string within the code to your
regional settings (VBA expects english indetifiers - I have to use
them also in my German Excel)

so could you check if the values in your column are real dates. E.g.
enter the worksheetfunction
=ISNUMBER(E1)
this should return TRUE

--
Regards
Frank Kabel
Frankfurt, Germany

"Martyn" schrieb im Newsbeitrag
...
Hi Frank,
Unfortunately that didn't effect anything. I checked the original

format of
data in my column E:E and confirm that they are in "gg/aa/yyyy"

format
(correct date format for my friend: format in Turkish language). And

I am a
bit confused why I should be using "numberformat" in code?
TIA

"Frank Kabel" wrote in message
...
Hi
if you have real dates in this column you should change the number
format. try
Columns("E:E").numberformat = "DD/MM/YYYY"

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
I used to activate the below macro via a control button for

changing
column E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a
worksheet. But it ain't working recently. Any ideas why? (p.s. :
recently u/g to WinXL from Win98). =================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Hi Frank,
Yes the values in my column E are real dates.
I've checked the worksheetfunctin
=ISNUMBER(E1)
=ISNUMBER(E2)
....
...
=ISNUMBER(E100) etc

and all gives me the results TRUE.
Now what can I do?
Regards


"Frank Kabel" wrote in message
...
Hi
a date format is a number format. So if you have stored your dates as
real date values you only change the format of the cell. Trying to
replace the delimiters won't work as they're just a format (and not
really within the cell).
Also you don't have to change the format string within the code to your
regional settings (VBA expects english indetifiers - I have to use
them also in my German Excel)

so could you check if the values in your column are real dates. E.g.
enter the worksheetfunction
=ISNUMBER(E1)
this should return TRUE

--
Regards
Frank Kabel
Frankfurt, Germany

"Martyn" schrieb im Newsbeitrag
...
Hi Frank,
Unfortunately that didn't effect anything. I checked the original

format of
data in my column E:E and confirm that they are in "gg/aa/yyyy"

format
(correct date format for my friend: format in Turkish language). And

I am a
bit confused why I should be using "numberformat" in code?
TIA

"Frank Kabel" wrote in message
...
Hi
if you have real dates in this column you should change the number
format. try
Columns("E:E").numberformat = "DD/MM/YYYY"

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
I used to activate the below macro via a control button for

changing
column E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a
worksheet. But it ain't working recently. Any ideas why? (p.s. :
recently u/g to WinXL from Win98). =================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
then simply changing the format with a procedure like
sub foo()
Columns("E:E").numberformat = "DD/MM/YYYY"
end sub

should change your format of this column

--
Regards
Frank Kabel
Frankfurt, Germany

"Martyn" schrieb im Newsbeitrag
...
Hi Frank,
Yes the values in my column E are real dates.
I've checked the worksheetfunctin
=ISNUMBER(E1)
=ISNUMBER(E2)
...
..
=ISNUMBER(E100) etc

and all gives me the results TRUE.
Now what can I do?
Regards


"Frank Kabel" wrote in message
...
Hi
a date format is a number format. So if you have stored your dates

as
real date values you only change the format of the cell. Trying to
replace the delimiters won't work as they're just a format (and not
really within the cell).
Also you don't have to change the format string within the code to

your
regional settings (VBA expects english indetifiers - I have to use
them also in my German Excel)

so could you check if the values in your column are real dates.

E.g.
enter the worksheetfunction
=ISNUMBER(E1)
this should return TRUE

--
Regards
Frank Kabel
Frankfurt, Germany

"Martyn" schrieb im Newsbeitrag
...
Hi Frank,
Unfortunately that didn't effect anything. I checked the original

format of
data in my column E:E and confirm that they are in "gg/aa/yyyy"

format
(correct date format for my friend: format in Turkish language).

And
I am a
bit confused why I should be using "numberformat" in code?
TIA

"Frank Kabel" wrote in message
...
Hi
if you have real dates in this column you should change the

number
format. try
Columns("E:E").numberformat = "DD/MM/YYYY"

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
I used to activate the below macro via a control button for

changing
column E data format from "dd.mm.yyyy" to "dd/mm/yyyy" of a
worksheet. But it ain't working recently. Any ideas why?

(p.s. :
recently u/g to WinXL from Win98). =================
Sub Macro2()
Columns("E:E").Replace _
What:=".", _
Replacement:="/", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
=================
TIA
Martyn W.







  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Thanks Frank, but somehow it doesn't help!.

"Frank Kabel" wrote in message
...
Hi
then simply changing the format with a procedure like
sub foo()
Columns("E:E").numberformat = "DD/MM/YYYY"
end sub

should change your format of this column

--
Regards
Frank Kabel
Frankfurt, Germany




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
what is happening exactly?

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Thanks Frank, but somehow it doesn't help!.

"Frank Kabel" wrote in message
...
Hi
then simply changing the format with a procedure like
sub foo()
Columns("E:E").numberformat = "DD/MM/YYYY"
end sub

should change your format of this column

--
Regards
Frank Kabel
Frankfurt, Germany

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Hi Frank, Actually "nothing" changes when I execute the macro!. No error
messages, but
the E column "." symbols are not replaced with "/".


"Frank Kabel" wrote in message
...
Hi
what is happening exactly?

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Thanks Frank, but somehow it doesn't help!.

"Frank Kabel" wrote in message
...
Hi
then simply changing the format with a procedure like
sub foo()
Columns("E:E").numberformat = "DD/MM/YYYY"
end sub

should change your format of this column

--
Regards
Frank Kabel
Frankfurt, Germany





  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
are you sure you have real numbers/dates in this column?

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Hi Frank, Actually "nothing" changes when I execute the macro!. No
error messages, but
the E column "." symbols are not replaced with "/".


"Frank Kabel" wrote in message
...
Hi
what is happening exactly?

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Thanks Frank, but somehow it doesn't help!.

"Frank Kabel" wrote in message
...
Hi
then simply changing the format with a procedure like
sub foo()
Columns("E:E").numberformat = "DD/MM/YYYY"
end sub

should change your format of this column

--
Regards
Frank Kabel
Frankfurt, Germany



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Yes I am sure.

"Frank Kabel" wrote in message
...
Hi
are you sure you have real numbers/dates in this column?

--
Regards
Frank Kabel
Frankfurt, Germany




  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default why did the macro stopped working?

Hi
o.k.
mail me your file and describe in your mail what exactly is not working
and I'll have a look at it
email: frank[dot]kabel[at]freenet[dot]de

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Yes I am sure.

"Frank Kabel" wrote in message
...
Hi
are you sure you have real numbers/dates in this column?

--
Regards
Frank Kabel
Frankfurt, Germany


  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default why did the macro stopped working?

Hi,
I've sent the file to your email with detailed info...
TIA
Martyn

"Frank Kabel" wrote in message
...
Hi
o.k.
mail me your file and describe in your mail what exactly is not working
and I'll have a look at it
email: frank[dot]kabel[at]freenet[dot]de

--
Regards
Frank Kabel
Frankfurt, Germany


Martyn wrote:
Yes I am sure.

"Frank Kabel" wrote in message
...
Hi
are you sure you have real numbers/dates in this column?

--
Regards
Frank Kabel
Frankfurt, Germany




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
Spreadsheet macro stopped working! Anders[_2_] Excel Discussion (Misc queries) 5 November 22nd 09 05:28 PM
Macro stopped working Ed Davis[_2_] Excel Discussion (Misc queries) 5 October 7th 09 11:46 PM
macro stopped working after upgrade to 2007 mohavv Excel Discussion (Misc queries) 1 June 16th 09 01:38 AM
Why have my Excel Macro Shortcuts stopped working? Mac Excel Worksheet Functions 0 November 6th 05 12:42 AM
HELP! Button/Macro or Function has stopped working! ikcizokm Excel Programming 3 September 6th 03 08:51 PM


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

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

About Us

"It's about Microsoft Excel"