As part of a project I am working on I take user input from list boxes, concatenate the input to create the path and file name to open and store that in a cell. I now am trying to open that file as part of a macro. Cell A21 contains this: =CONCATENATE("J:\Information\Rack Power Database\Programming\Deployed Racks\", B3, "\", B4, ".xlsm") . Any suggestions as to how to best accomplish this as I keep erroring out on the last line of code? Not sure if this needs to be identified as a value or if it should not be dimensioned as a string.
![]()
Sub NewRackinCO() ' New Rack in CO ' This button allows you to add a new rack into a CO ' ' Dimension the Variables Dim Cust As String Dim SiteName As String Dim RackPosNo As String Dim ACDCVolt As String Dim strPath As String ' Stores Input data as variables Sheets("New Rack in C.O.").Select Range("B3").Select Cust = ("B3") SiteName = ("B4") RackPosNo = ("B5") ACDCVolt = ("B6") strPath = ("A21") ' Opens the workbook "SiteName" in the "Cust" directory to add a new rack Workbooks.Open Filename:=strPath End Sub
Bookmarks