LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2007, 01:10 PM   #1
rhoyerboat
Member
 
Registered: Feb 2005
Posts: 40

Rep: Reputation: 15
VB, 30 seconds of your time, please?


This is for VB in MS Excel, should be a small and simple
routine, but .. wow what a crummy documentation package.
Search for "conditional" or "or" in Excel's VB help file and see what it tells you, shameful. Anyway, I can't figure out why this doesn't work;

If ActiveCell.Value = "xxxx" OR "xxxx1" then (blahblah)

The compilation error reports it as a type mismatch.

Devolving the statement into;

If ActiveCell.Value = "xxxx" then (blahblah)

works just fine, as does

If ActiveCell.Value = "xxxx1"


Anyway, sorry to bug yall with such a lamebrained question, but .. yeah, VB docs that are actually useful .. um .. maybe
Microsoft will sell them to me but I cant find them on the internet.

BTW, If anyone knows a good web based resource for a C language programmer / Linux afficianado using VB, I would sure appreciate a link.
 
Old 02-27-2007, 01:16 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
i thought VB was ok with that. but if not try both complete conditions seperated by OR.

Code:
If ActiveCell.Value = "xxxx" OR ActiveCell.Value = "xxxx1" then
 
Old 02-27-2007, 01:26 PM   #3
rhoyerboat
Member
 
Registered: Feb 2005
Posts: 40

Original Poster
Rep: Reputation: 15
Eureka!

If ActiveCell.Value = "xxxx" Or ActiveCell.Value = "xxxx1" Then

.. Thats the sauce, gracias.

Best forum ever, (and nadroj too), thank you and have a nice day.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
convert total no of seconds in the format hour minutes and seconds suchi_s Programming 15 03-15-2011 11:34 AM
Bash: how to get time (in seconds) elapsed since creation of a file? J_Szucs Linux - General 6 12-27-2008 11:28 PM
Trying to get ps to display time a process has been running in seconds kinetik Programming 1 02-26-2007 07:21 PM
10 seconds in google? davidmelv Linux - Software 1 10-09-2004 09:39 AM
get system time in mili-seconds how to onnyloh Programming 2 09-22-2004 01:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration