Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cells formatting done without me allowing it in VBA
Hi, I have 2 sheets that are used as source data. And I have a form where I import from the source sheets data. After modifications, I copy back the data in the source sheets. The problem is that cells formatted as monetary values with decimal seem to copy as text. So when I try to do automated mathematic functions in vba, it says incompatible type. And when I debug in VBA, I see that the monetary values have quotation marks in the yellow debug mode as if it was quoted as text. Is there a way to prevent this side effect? Thx! Werner -- Werner ------------------------------------------------------------------------ Werner's Profile: http://www.excelforum.com/member.php...o&userid=24304 View this thread: http://www.excelforum.com/showthread...hreadid=386446 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cells formatting done without me allowing it in VBA
Convert them to numbers.
Anything stored in a textbox is a string. -- Regards, Tom Ogilvy "Werner" wrote in message ... Hi, I have 2 sheets that are used as source data. And I have a form where I import from the source sheets data. After modifications, I copy back the data in the source sheets. The problem is that cells formatted as monetary values with decimal seem to copy as text. So when I try to do automated mathematic functions in vba, it says incompatible type. And when I debug in VBA, I see that the monetary values have quotation marks in the yellow debug mode as if it was quoted as text. Is there a way to prevent this side effect? Thx! Werner -- Werner ------------------------------------------------------------------------ Werner's Profile: http://www.excelforum.com/member.php...o&userid=24304 View this thread: http://www.excelforum.com/showthread...hreadid=386446 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cells formatting done without me allowing it in VBA
Thx for the help Tom. Finally I have found a way to solve my problem Before importing data from the source sheet I run a macro that format all currency values into standard values. They, by this way, becom regular numbers. It then copies those values into my form and they ar reconverted as currency values after that. And my math functions wor after that -- Werne ----------------------------------------------------------------------- Werner's Profile: http://www.excelforum.com/member.php...fo&userid=2430 View this thread: http://www.excelforum.com/showthread.php?threadid=38644 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Allowing sort of protected cells | Excel Worksheet Functions | |||
Conditional Formatting - allowing for Blank Cells | Excel Discussion (Misc queries) | |||
protecting a sheet yet allowing for sorting, filtering, formatting | Excel Discussion (Misc queries) | |||
Protecting Sheet and still allowing for sorting, filtering and formatting | Excel Discussion (Misc queries) | |||
Allowing formatting in lower versions of EXCEL | Excel Programming |