Re: Looking for a way to convert dec to bin

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:uITfVFBYHHA.992@xxxxxxxxxxxxxxxxxxxxxxx
Dim res As String: res = "00000000"
Dim i As Long: i = 8

Interesting way of declaring starting values for your variables...never
seen
that style before.


Rob


I was about to write something about I use/abuse colons all the time, but
one has to be very careful here. <g>

The other nice thing about colons, besides the ability to declare and define
variables in one place, is it preserves formatting to make your code even
easier to read.
So this this ...
Dim idx As Long: idx = 100
Dim sWheelName As String: sWheelName = "abc"
Dim r8Radius As Double: r8Radius = 5.6
becomes ...
Dim idx As Long: idx = 100
Dim sWheelName As String: sWheelName = "abc"
Dim r8Radius As Double: r8Radius = 5.6

-ralph


.



Relevant Pages

  • Re: Questions concerning VBA coding
    ... By declaring your variables, you get nice help from the VBE (especially ... VBE will match your variable's case to the Dim statement. ... tells excel that something in the next portion could cause an error, ... > Sub Copy_Template ...
    (microsoft.public.excel.misc)
  • Re: Dont get Array value in textbox
    ... Public Sub UT(ByVal Segment As String, ByVal BD As, ByVal ... though there's little problem with declaring it as a Function. ... USPoPA_NpaNxx = Cells(adrsX, adrsY) ... Dim test As String ...
    (microsoft.public.vb.general.discussion)
  • RE: auto-input text bx depending on 2 drops
    ... I would suggest that you design a table just exactly like the design you ... 'declaring this variable as Byte assumes that the field is also a number ... Dim strValue2 as String ... have a text box that is dependant on what 2 items are selected from the ...
    (microsoft.public.access.formscoding)
  • Re: Problem with assigning new variables to duplicate form
    ... > I am trying to use you loop but something is missing I think. ... >> dim i as long, ... >> Public Function WindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ... or using two dimensional array or declaring simply Type ...
    (microsoft.public.vb.general.discussion)
  • Re: Is VB Caca??
    ... It warns you because you are declaring a variable in the scope that hides a variable with the same name with a larger scope. ... Mike Ober. ... Dim s As String ...
    (microsoft.public.dotnet.languages.vb)