Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Allowing sort of protected cells albie60 Excel Worksheet Functions 1 July 24th 09 05:48 PM
Conditional Formatting - allowing for Blank Cells Hojo Excel Discussion (Misc queries) 2 January 24th 07 11:10 PM
protecting a sheet yet allowing for sorting, filtering, formatting [email protected] Excel Discussion (Misc queries) 0 June 28th 06 03:39 PM
Protecting Sheet and still allowing for sorting, filtering and formatting [email protected] Excel Discussion (Misc queries) 0 June 26th 06 05:19 PM
Allowing formatting in lower versions of EXCEL Tom Ogilvy Excel Programming 1 August 19th 03 06:42 PM


All times are GMT +1. The time now is 03:35 AM.

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

About Us

"It's about Microsoft Excel"