Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again Carl,
The code I posted before will work if the workbook containing the worksheet Customize is the active workbook. Therefore I suggest that you might be better to do it the following way to ensure that the code is addressing the correct workbook with the sheet Customize. Create the strPathFile first and ensure it is addressing the correct workbook before using it in the run command. Sub test() Dim wb As Workbook Dim strPathFile 'If not the workbook with the sub then 'set to whatever workbook has sheet Customize. Set wb = ThisWorkbook With wb.Sheets("Customize") strPathFile = .Range("F36").Value _ & "\" & .Range("F42").Value End With Application.Run "'" & strPathFile & _ "'" & "!ClearTotalSavings" End Sub -- Regards, OssieMac |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieving Excel File extension based on XL File Format Enumeratio | Excel Programming | |||
Create CSV file based on table in Excel file | Excel Programming | |||
Can I use code/macro to change code/macro in an existing file? | Excel Programming | |||
Seting a Constant (via code) when creating a new file based on a template | Excel Programming | |||
Import VBA Code in Excel-File ? (Export VBA Code to file) | Excel Programming |