Excel Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What commads can I use to test a value in a given cell on a worksheet?

I want to open a secondary worksheet based on the number in a cell.
 
Hi,

Try something like this

Sub stantial()
If Range("A1").Value = 1 Then
Path = "C:\"
fname = "Testbook.xls"
Pass = "mypass"
Set mybook = Workbooks.Open(Path & fname, Password:=Pass)
End If
End Sub


Mike
 
Thank you Mike - - but I am not real familier VB I am using 4.0 macro language
have been trying stuff like this
=SET.NAME("MAG1",1)
=SET.NAME("MAG2",2)
=SET.NAME("MAG3",3)
=IF(ABS("RC[11]")=MAG3,ACTIVATE("M3"))
=IF(ABS("RC[11]")=MAG2,ACTIVATE("M2"))
=IF(ABS("RC[11]")=MAG1,ACTIVATE("M1"))
 

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