PC Review


Reply
 
 
paul
Guest
Posts: n/a
 
      16th Aug 2007
hwo do i write this into a VBA code
where i want variable A to be set to 4 if the variable B is greater or
equal to 14

otherwise it is to be set to 16 if the variable C lies between 5 and
10 otherwise it will be set to 9???

 
Reply With Quote
 
 
 
 
Snake Plissken
Guest
Posts: n/a
 
      16th Aug 2007
Sub kod()

Dim varA, varB, varC As Integer

On Error Resume Next

' varA, varB, varC should be initialized somehow

If varB >= 14 Then

varA = 4


ElseIf varC >= 5 And varC <= 10 Then
varA = 16

Else

varA = 9

End If


End Sub


 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      17th Aug 2007
The macro works as intended and exactly as Paul requested. Where is your
proof?
--



"barnabel" wrote:

> Jim, you got the homework wrong.
>
> That is setting A=9 if C is between 5 and 10 and doesn't set A otherwise.
>
> "Jim Jackson" wrote:
>
> > If B >= 14 then
> > A = 4
> > elseif C >= 5 then
> > If C <=10 then
> > A = 9
> > End If
> > End If
> >
> > --
> > Best wishes,
> >
> > Jim
> >
> >
> > "paul" wrote:
> >
> > > hwo do i write this into a VBA code
> > > where i want variable A to be set to 4 if the variable B is greater or
> > > equal to 14
> > >
> > > otherwise it is to be set to 16 if the variable C lies between 5 and
> > > 10 otherwise it will be set to 9???
> > >
> > >

 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      17th Aug 2007
If B >= 14 then
A = 4
elseif C >= 5 then
If C <=10 then
A = 9
End If
End If

--
Best wishes,

Jim


"paul" wrote:

> hwo do i write this into a VBA code
> where i want variable A to be set to 4 if the variable B is greater or
> equal to 14
>
> otherwise it is to be set to 16 if the variable C lies between 5 and
> 10 otherwise it will be set to 9???
>
>

 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      17th Aug 2007
What is your purpose in being so snotty while, at the same time, ofering no
useful help for the one asking for assistance? Do you not know how to
achieve what he asked for?
--
Best wishes,

Jim


"barnabel" wrote:

> How did you do on the last homework assignment?
>
> "paul" wrote:
>
> > hwo do i write this into a VBA code
> > where i want variable A to be set to 4 if the variable B is greater or
> > equal to 14
> >
> > otherwise it is to be set to 16 if the variable C lies between 5 and
> > 10 otherwise it will be set to 9???
> >
> >

 
Reply With Quote
 
=?Utf-8?B?YmFybmFiZWw=?=
Guest
Posts: n/a
 
      17th Aug 2007
How did you do on the last homework assignment?

"paul" wrote:

> hwo do i write this into a VBA code
> where i want variable A to be set to 4 if the variable B is greater or
> equal to 14
>
> otherwise it is to be set to 16 if the variable C lies between 5 and
> 10 otherwise it will be set to 9???
>
>

 
Reply With Quote
 
=?Utf-8?B?YmFybmFiZWw=?=
Guest
Posts: n/a
 
      17th Aug 2007
Jim, you got the homework wrong.

That is setting A=9 if C is between 5 and 10 and doesn't set A otherwise.

"Jim Jackson" wrote:

> If B >= 14 then
> A = 4
> elseif C >= 5 then
> If C <=10 then
> A = 9
> End If
> End If
>
> --
> Best wishes,
>
> Jim
>
>
> "paul" wrote:
>
> > hwo do i write this into a VBA code
> > where i want variable A to be set to 4 if the variable B is greater or
> > equal to 14
> >
> > otherwise it is to be set to 16 if the variable C lies between 5 and
> > 10 otherwise it will be set to 9???
> >
> >

 
Reply With Quote
 
=?Utf-8?B?YmFybmFiZWw=?=
Guest
Posts: n/a
 
      17th Aug 2007
Where is the number 16? "otherwise it is to be set to 16 if the variable C
lies between 5 and 10 otherwise it will be set to 9"

"Jim Jackson" wrote:

> The macro works as intended and exactly as Paul requested. Where is your
> proof?
> --
>
>
>
> "barnabel" wrote:
>
> > Jim, you got the homework wrong.
> >
> > That is setting A=9 if C is between 5 and 10 and doesn't set A otherwise.
> >
> > "Jim Jackson" wrote:
> >
> > > If B >= 14 then
> > > A = 4
> > > elseif C >= 5 then
> > > If C <=10 then
> > > A = 9
> > > End If
> > > End If
> > >
> > > --
> > > Best wishes,
> > >
> > > Jim
> > >
> > >
> > > "paul" wrote:
> > >
> > > > hwo do i write this into a VBA code
> > > > where i want variable A to be set to 4 if the variable B is greater or
> > > > equal to 14
> > > >
> > > > otherwise it is to be set to 16 if the variable C lies between 5 and
> > > > 10 otherwise it will be set to 9???
> > > >
> > > >

 
Reply With Quote
 
=?Utf-8?B?YmFybmFiZWw=?=
Guest
Posts: n/a
 
      17th Aug 2007
Sure I do. Snake answered it correctly.

What is the point of having somebody do your homework for you? Why bother
taking the class?

"Jim Jackson" wrote:

> What is your purpose in being so snotty while, at the same time, ofering no
> useful help for the one asking for assistance? Do you not know how to
> achieve what he asked for?
> --
> Best wishes,
>
> Jim
>
>
> "barnabel" wrote:
>
> > How did you do on the last homework assignment?
> >
> > "paul" wrote:
> >
> > > hwo do i write this into a VBA code
> > > where i want variable A to be set to 4 if the variable B is greater or
> > > equal to 14
> > >
> > > otherwise it is to be set to 16 if the variable C lies between 5 and
> > > 10 otherwise it will be set to 9???
> > >
> > >

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      17th Aug 2007
On Thu, 16 Aug 2007 04:47:34 -0700, paul <(E-Mail Removed)> wrote:

>hwo do i write this into a VBA code
>where i want variable A to be set to 4 if the variable B is greater or
>equal to 14
>
>otherwise it is to be set to 16 if the variable C lies between 5 and
>10 otherwise it will be set to 9???


something like:

If B >= 14 Then
A = 4
ElseIf C > 5 And C < 10 Then
A = 16
Else
A = 9
End If
--ron
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding help RGlade Microsoft Word Document Management 2 14th Sep 2009 02:44 PM
VB Coding AlbertaRose Microsoft Access VBA Modules 2 24th Mar 2008 10:21 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan Microsoft Excel Programming 10 6th Oct 2005 01:18 PM
coding help dxiong Microsoft Access 3 27th Jul 2004 11:17 PM
Problems with coding and coding question!! James Microsoft Access Form Coding 0 23rd Feb 2004 10:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:37 AM.