Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If...Then...query


Hi,

Extremely simple one for a Thursday....

I have a line of code that currently reads;



Code:
--------------------


If ("C28") = Blank Then Goto JUMP


--------------------


I want to change it so that it prints a document if the field is NOT
blank. I think it should be something like this...



Code:
--------------------


If ("C28") = NotBlank Then objWord.Application.PrintOut


--------------------


Obviously I have tried the above with no success...

Thanks


--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518204

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default If...Then...query

If ("C28") < Blank Then Goto JUMP

assuming Blank is a variable or you are using it illustratively.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Alec H" wrote in
message ...

Hi,

Extremely simple one for a Thursday....

I have a line of code that currently reads;



Code:
--------------------


If ("C28") = Blank Then Goto JUMP


--------------------


I want to change it so that it prints a document if the field is NOT
blank. I think it should be something like this...



Code:
--------------------


If ("C28") = NotBlank Then objWord.Application.PrintOut


--------------------


Obviously I have tried the above with no success...

Thanks


--
Alec H
------------------------------------------------------------------------
Alec H's Profile:

http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518204



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


Bob,

Blank was to represent an empty cell. In essence I want to print
document if there are contents (of any sort, text or numeric) in cel
C28 or just continue to the next line of code if cell C28 is completel
empty.

Alec.




Bob Phillips Wrote:
If ("C28") < Blank Then Goto JUMP

assuming Blank is a variable or you are using it illustratively.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Alec H" wrot
in
message ...

Hi,

Extremely simple one for a Thursday....

I have a line of code that currently reads;



Code:
--------------------


If ("C28") = Blank Then Goto JUMP


--------------------


I want to change it so that it prints a document if the field is NOT
blank. I think it should be something like this...



Code:
--------------------


If ("C28") = NotBlank Then objWord.Application.PrintOut


--------------------


Obviously I have tried the above with no success...

Thanks


--
Alec H


------------------------------------------------------------------------
Alec H's Profile:

http://www.excelforum.com/member.php...o&userid=31042
View this thread

http://www.excelforum.com/showthread...hreadid=518204


--
Alec
-----------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...fo&userid=3104
View this thread: http://www.excelforum.com/showthread.php?threadid=51820

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


Solved the problem with;


Code:
--------------------


If Range("C28").Value < "" Then
objWord.Application.PrintOut
End If


--------------------


Thanks for all help.:)






Alec H Wrote:
Bob,

Blank was to represent an empty cell. In essence I want to print a
document if there are contents (of any sort, text or numeric) in cell
C28 or just continue to the next line of code if cell C28 is completely
empty.

Alec.



--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=518204

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
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 0 November 28th 05 06:37 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


All times are GMT +1. The time now is 08:01 PM.

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"