Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.
Public Function TestExcel() Dim x x = fExcelCellADO("C1", "\\pacper.local\PPI Share\ProductionShopFloor\client\TESTING\ZR0040911.xls", "Inputs!") MsgBox x End Function Function fExcelCellADO(strCell As String, strFileName As String, strSheetName As String) Dim cn As ADODB.Connection Dim rs As ADODB.Recordset Set cn = New ADODB.Connection cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" _ & "Data Source=" & strFileName & ";" _ & "Extended Properties='Excel 8.0;HDR=No;IMEX=1';" Set rs = New ADODB.Recordset 'rs.Open "SELECT F1 FROM [" & strSheetName & "$" & strCell & ":" & strCell & "]", cn rs.Open "SELECT F1 FROM [" & strSheetName & strCell & "]", cn fExcelCellADO = rs!f1 rs.Close Set rs = Nothing cn.Close Set cn = Nothing End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.