Transfer of number and losing decimal place

Autotech

New Member
Joined
Aug 30, 2005
Messages
29
Hello I am having a problems transfering a number (ex. 12.34) to Reflections. What is happening is that when the last number (4) is a zero an not a whole number the zero is not transfered which creates and error because the number is not complete.


Code:
Dim Session As Object
Set Session = GetObject(, "ReflectionIBM.Session")

Session.Connect
With Session
Session.Visible = True 'Connect to Reflection and make visible

  .SetMousePos 3, 22
  .TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
  .TransmitANSI [B9].Value 'set mouse location and transfer cell B9 value
  
  .SetMousePos 3, 41
        .TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
        .WaitForEvent rcEnterPos, "30", "0", 3, 41 'move mouse position
        
        .TransmitTerminalKey rcIBMEnterKey 'enter key
        
        .WaitForEvent rcEnterPos, "30", "0", 9, 22
        .WaitForDisplayString ":", "30", 9, 20
        .TransmitANSI "        "
        .TransmitTerminalKey rcIBMLeftKey
        .TransmitTerminalKey rcIBMLeftKey 'set mouse position, set field to blank
        
.SetMousePos 9, 26
        .TerminalMouse rcLeftClick, rcMouseRow, rcMouseCol
        .TransmitANSI [B4].Value 'set mouse positon and transfer B4 value
   
        .TransmitTerminalKey rcIBMF16Key

I need two decimal places even if they are zeros.
Any ideas?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Andrew Poulsom

I tried this code and the zero did appear, but Reflection seen this as a non number and errored.

Code:
.TransmitANSI [B9].Text 'set mouse location and transfer cell B9 value
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top