Can you access a system variable from a excel spreadsheet

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I want to access a value held in a system variable defined
by a script that counts the number of lines in a text
file. Can this be done??
 
You would need to make a User Defined function (UDF) that returns the value
of the variable.

Public gSysVar as Long


Public Function ReturnValue()
Application.Volatile
ReturnValue = gSysVar
End Sub



=300*ReturnValue()
 
Or can I automate the refresh external data
function???. . this would do what I want. I have set up a
import of external data within excel and counta those
lines, all i need to do is automatically refresh that
external data. . . if that could happen it would be so
very cool!!!!!!!

Oh please Mr. Ogilvy tell me that can be done. . .
 
If you are using a querytable, then you can refresh it. If you have a
macro that reads the data into a worksheet at a specific location, you can
run the macro again. I don't know what you have already set up, so I can't
say what you can do.
 
Mr. Ogilvy,

Your other VB solution for counting lines in a text file
is a far more elegant solution for what I want to do. Just
for my knowledge, is there a way to have that macro run
automatically at a set interval, I assigned a hot key to
the macro but I would like to automate it if I can.

your most humble student. . .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top