LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default What in the world is it doing??

Have run into a crazy problem. Have a macro that scans selected cells and,
if the content is a string, does a string manipulation. However, have
discovered that if the content is a certain type of string, VBA goes into
orbit.

Essence of situation: Select a series of cells in a pivot table. Cells
format is General. Execute a loop: For each cell in selection, if
typename(cell.value) = "String" then cell.value = "0" & cell.value.

Typical string data is <533: Then Text. Code works fine to make this
<0533: Then Text. However, when data is <715: 1.2, cell.value tests true
as string, but cell.value = "0" & cell.value causes a cell value of
<0.496541666666667 instead of the intended <0715: 1.2, is still format
General, typename string, and the worksheet is wacked out and VBA code jumps
out of the sub and starts executing in other subs that aren't even
referenced in it. End up having to use Task Manager to kill Excel, then
start over. So, what in the world is going on??

Win XP Pro, Office XP, both with all updates.

Thanks in advance for any ideas!
George


 
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 in the world!???? kfs Excel Worksheet Functions 6 April 1st 09 08:39 PM
World Cup tipping kimare Excel Worksheet Functions 0 June 26th 06 12:42 PM
World Cup Competition SamTummo Excel Discussion (Misc queries) 2 June 5th 06 05:09 PM
World Cup Bill[_37_] Excel Programming 0 December 20th 05 08:07 PM
World Cup Bill[_37_] Excel Programming 0 December 20th 05 07:58 PM


All times are GMT +1. The time now is 11:51 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"