Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default In VBA editor x = 1.1e-3 is reformated to x = 0.0011

When I enter the line

x = 1.1e-3

in the visual basic editor and hit return, it is automatically
reformated to

x = 0.0011

Can I stop this? It makes it hard to check that constants such as
1.1e-11 are programed correctly.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,101
Default In VBA editor x = 1.1e-3 is reformated to x = 0.0011

maybe this
x = "1.1e-3"

"elfnor" wrote:

When I enter the line

x = 1.1e-3

in the visual basic editor and hit return, it is automatically
reformated to

x = 0.0011

Can I stop this? It makes it hard to check that constants such as
1.1e-11 are programed correctly.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default In VBA editor x = 1.1e-3 is reformated to x = 0.0011


You can declare Constants equal to the number and then use the
constants in your code...
Const OnePtOneE_3 As Double = 0.0011
Const OnePtOneE_11 As Double = 0.000000000011

x = OnePtOneE_11 * 2
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"elfnor"wrote in message
When I enter the line
x = 1.1e-3
in the visual basic editor and hit return, it is automatically
reformated to
x = 0.0011
Can I stop this? It makes it hard to check that constants such as
1.1e-11 are programed correctly.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default In VBA editor x = 1.1e-3 is reformated to x = 0.0011

Maybe something like:

X = 1.1 * 10 ^ -3

or

X = 1.1 * 10 ^(-3) to make sure the -3 is not read as a subtract
operation.

--
Regards,
Bill Renaud



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
VBA editor Yara Excel Discussion (Misc queries) 4 October 16th 07 11:24 PM
VB Editor mlh Excel Discussion (Misc queries) 2 June 29th 07 01:17 PM
VB Editor Sandy Excel Programming 0 June 6th 07 12:43 PM
VB editor bug? John Excel Programming 1 May 24th 06 08:31 PM
VBA Editor Pierre[_17_] Excel Programming 4 January 28th 06 02:30 PM


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