I am not able to construct a workbook file name as a string and use it to activate a workbook.
Option Private Module
Public wbVersion As String
Public sFilePath As String
Public wbCntl As Workbook
Public wbFilename as String
Sub SetConstantVari ables()
wbVersion = " v12.xls"
sFilePath = "I:\Documen ts and Settings\Grant\ My Documents\Neuro Fission\Develop ment\"
wbFilename = sFilePath + "Control" + wbVersion
wbFilename.Acti vate
or
Workbooks(wbFil ename).Activate
etc
.
.
Apparently, none of the methods for activating the workbook works for me, using a predefined string name for the workbook. Can this be done? What might I be doing wrong?
Grant
Option Private Module
Public wbVersion As String
Public sFilePath As String
Public wbCntl As Workbook
Public wbFilename as String
Sub SetConstantVari ables()
wbVersion = " v12.xls"
sFilePath = "I:\Documen ts and Settings\Grant\ My Documents\Neuro Fission\Develop ment\"
wbFilename = sFilePath + "Control" + wbVersion
wbFilename.Acti vate
or
Workbooks(wbFil ename).Activate
etc
.
.
Apparently, none of the methods for activating the workbook works for me, using a predefined string name for the workbook. Can this be done? What might I be doing wrong?
Grant
Comment