DIVINEDAR0956
IS-IT--Management
The following procedure works perfect for opening any excel file in a directory. My only problem is that when you close the excel file and click the edit button again the excel form is underneath the desktop or any other application that may be open and does not appear even if you click the excel button on the status bar. The procedure is as follows:
Public Sub EditProjectNumber()
Dim xl As Object
Dim Wb As Object
Dim sht As Object
Set xl = Excel.Application
' If you want Excel to appear, use next line:
xl.Visible = True
xl.Dialogs(xlDialogOpen).Show "C:\Cost"
Set Wb = xl.ActiveWorkbook
Set sht = Wb.Sheets("PROJECT_INFORMATION"
End Sub
Question:
1.Is there any way to repaint or refresh this within the VB code so it will always appear at any time you click the button.
2. What is the code for updating links to the excel spreadsheet when you open a file? All the excel files are in the same format so they all have the same range name on each link.
3. Do I delete the link and do a code for transferspreadsheet? If so How do I tell the code to delete the link and redo the same link each time.
Public Sub EditProjectNumber()
Dim xl As Object
Dim Wb As Object
Dim sht As Object
Set xl = Excel.Application
' If you want Excel to appear, use next line:
xl.Visible = True
xl.Dialogs(xlDialogOpen).Show "C:\Cost"
Set Wb = xl.ActiveWorkbook
Set sht = Wb.Sheets("PROJECT_INFORMATION"
End Sub
Question:
1.Is there any way to repaint or refresh this within the VB code so it will always appear at any time you click the button.
2. What is the code for updating links to the excel spreadsheet when you open a file? All the excel files are in the same format so they all have the same range name on each link.
3. Do I delete the link and do a code for transferspreadsheet? If so How do I tell the code to delete the link and redo the same link each time.