Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default changing the constants in the find function

I am writing a program using the find function in VBA. I would like for the user to be able to chose whether to look in values or formulas (LookIn:=xlValue or xlFormula). When I set a variable = to "xlValue" or xlFormula I get an error message in the find formula. How do you let the user control the LookIn value?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default changing the constants in the find function

xlValues and xlFormulas are actually numbers, constants, not strings. They
belong to the xlFindLookIn enumeration, and their actual values a

?xlFindLookIn.xlValues, xlFindLookIn.xlFormulas
-4163 -4123

--
Regards

Juan Pablo González

"OkieViking" wrote in message
...
I am writing a program using the find function in VBA. I would like for

the user to be able to chose whether to look in values or formulas
(LookIn:=xlValue or xlFormula). When I set a variable = to "xlValue" or
xlFormula I get an error message in the find formula. How do you let the
user control the LookIn value?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default changing the constants in the find function

You can find the numbers like this

Alt-F11
Ctrl-G to display the Immediate window

Enter this and press Enter
? xlFormulas

You get the number -4123

Or Juan his example

?xlFindLookIn.xlValues, xlFindLookIn.xlFormulas
-4163 -4123


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Juan Pablo González" wrote in message ...
xlValues and xlFormulas are actually numbers, constants, not strings. They
belong to the xlFindLookIn enumeration, and their actual values a

?xlFindLookIn.xlValues, xlFindLookIn.xlFormulas
-4163 -4123

--
Regards

Juan Pablo González

"OkieViking" wrote in message
...
I am writing a program using the find function in VBA. I would like for

the user to be able to chose whether to look in values or formulas
(LookIn:=xlValue or xlFormula). When I set a variable = to "xlValue" or
xlFormula I get an error message in the find formula. How do you let the
user control the LookIn value?




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
Find and Replace - Changing 1st # only Studebaker Excel Discussion (Misc queries) 3 October 12th 07 01:12 AM
Find and Replace without changing font Tony Logan Excel Discussion (Misc queries) 4 December 11th 06 03:02 PM
changing the default type of searching in the find function Jose Roberto Excel Discussion (Misc queries) 1 November 29th 05 12:51 AM
constants Confused Excel Discussion (Misc queries) 3 December 2nd 04 05:05 PM
backwards find function to find character in a string of text Ashleigh K. Excel Programming 1 January 14th 04 04:36 PM


All times are GMT +1. The time now is 04:24 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"