LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Variable in Macro?


Hi everybody,

this is probably not the most challenging question for you, but still
don't know how to do it (Newbie).

I have a little Macro, that counts lines with certain Elements in
logfile:

Code
-------------------
Sub LogDateiLesen()
Dim zeile, anz ' zeile means line
Open "C:\Log.txt" For Input As 1
While Not EOF(1)
Line Input #1, zeile
If InStr(zeile, "ELEMENT") 0 And InStr(zeile, "pubid-601311277") 0 Then anz = anz + 1
Wend
Close
Cells(5, 4) = anz 'cell D5
End Su
-------------------


Now, instead of ELEMENT as one of the criteria above, I would like t
have the _content_of_the_cell_A3__of the active worksheet as
criteria.
PLUS this content shall be followed by an additional space.
So I guess I have to define a variable....?
How do I have to put it into that code??

THANKS SO MUCH!!!

JVLenno

--
JVLenno
-----------------------------------------------------------------------
JVLennox's Profile: http://www.excelforum.com/member.php...fo&userid=3250
View this thread: http://www.excelforum.com/showthread.php?threadid=56307

 
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
Variable Macro Heather O'Malley Excel Discussion (Misc queries) 2 August 2nd 06 04:19 PM
Macro prompts for a number to be used in this macro as a variable Drahos Excel Programming 6 May 31st 06 10:26 AM
Running a variable macro when any value is entered into a variable cell [email protected] Excel Programming 3 December 14th 05 05:15 PM
Macro Creating Variable and using variable in a SQL statement Jimmy Excel Programming 4 October 25th 04 02:36 AM
using one macro to set a variable in another Tim[_39_] Excel Programming 2 July 14th 04 01:42 PM


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