#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default If Then

I have a macro called "create" I want repeated until the value of A20 is not
"No". I took a few wild guesses (see below). I am prolly not using A20, =
and "No" correctly. Also, instead of "=", what could I use for "not equal"?
I appreciate the help.

If ("A20") = "No" Then
Application.Run "'Crew 2007 August 1 Randoms.xls'!create"
End If

If ("A20") = "No" Then Application.Run "'Crew 2007 August 1
Randoms.xls'!create"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default If Then

If Range("A20") = "No" Then

Not equal is <

Greater than is

Less than is <

Regards,

OssieMac

"netjes" wrote:

I have a macro called "create" I want repeated until the value of A20 is not
"No". I took a few wild guesses (see below). I am prolly not using A20, =
and "No" correctly. Also, instead of "=", what could I use for "not equal"?
I appreciate the help.

If ("A20") = "No" Then
Application.Run "'Crew 2007 August 1 Randoms.xls'!create"
End If

If ("A20") = "No" Then Application.Run "'Crew 2007 August 1
Randoms.xls'!create"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default If Then

Thanks. I used to use < in ye olde BASIC days. Glad to know it still
works. My macro works perfectly now. Thanks again.

"OssieMac" wrote:

If Range("A20") = "No" Then

Not equal is <

Greater than is

Less than is <

Regards,

OssieMac

"netjes" wrote:

I have a macro called "create" I want repeated until the value of A20 is not
"No". I took a few wild guesses (see below). I am prolly not using A20, =
and "No" correctly. Also, instead of "=", what could I use for "not equal"?
I appreciate the help.

If ("A20") = "No" Then
Application.Run "'Crew 2007 August 1 Randoms.xls'!create"
End If

If ("A20") = "No" Then Application.Run "'Crew 2007 August 1
Randoms.xls'!create"

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default If Then

Not neccessary, but I like to assign the complete function name to a shorter
string variable.

Sub Demo()
Const Fx As String = "'Crew 2007 August 1 Randoms.xls'!create"
Const strNo As String = "No"

Do While Range("A20") = strNo
Run Fx
Loop
End Sub

--
Dana DeLouis
Windows XP & Excel 2007


"netjes" wrote in message
...
Thanks. I used to use < in ye olde BASIC days. Glad to know it still
works. My macro works perfectly now. Thanks again.

"OssieMac" wrote:

If Range("A20") = "No" Then

Not equal is <

Greater than is

Less than is <

Regards,

OssieMac

"netjes" wrote:

I have a macro called "create" I want repeated until the value of A20
is not
"No". I took a few wild guesses (see below). I am prolly not using
A20, =
and "No" correctly. Also, instead of "=", what could I use for "not
equal"?
I appreciate the help.

If ("A20") = "No" Then
Application.Run "'Crew 2007 August 1 Randoms.xls'!create"
End If

If ("A20") = "No" Then Application.Run "'Crew 2007 August 1
Randoms.xls'!create"



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



All times are GMT +1. The time now is 11:32 PM.

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

About Us

"It's about Microsoft Excel"