How to do it in macro?

E

Eric

Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
....
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric
 
E

Eduardo

Hi,
you can use a formula like

=IF('[File.xls]check'!N18=1,"Yes","NO")

if N18 =1 will enter yes otherwise no

hope this helps
 
E

Eric

Could you please tell me how to code it in macro VBA?
including the directory
Thanks in advance for any suggestions
Eric

Eduardo said:
Hi,
you can use a formula like

=IF('[File.xls]check'!N18=1,"Yes","NO")

if N18 =1 will enter yes otherwise no

hope this helps

Eric said:
Does anyone have any suggestions on how to retrieve a specific cell value
within specific workbook without opening it on macro?

I would like to set if-statement as shown below

WkbkName = "D:\Documents\TS\file.xls"
If wkbk.Sheets("Check").Range("N18").Value = 1 Then
...
Does anyone have any suggestions on how to code the workbook part? in order
to make it work.
Thanks in advance for any suggestions
Eric
 

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

Top