Hi:
I am new to VB and quite unfamiliar with the different commands. I am using the following code and was wondering if it could be adjusted.
Sub PrepareBankSummarySheet()
'
' PrepareBankSummarySheet Macro
' Macro recorded 29/11/2005 (FINAL)
'
'
Range("F30").Select
Application.Run "'Nov 29th FINAL.xls'!ShowAllBankSummaryData"
Range("A2:C401").Select
Selection.FillDown
ActiveWindow.ScrollRow = 1
Range("A2").Select
Application.Run "'Nov 29th FINAL.xls'!HideBankSummaryData"
End Sub
Can this be tweaked to remain functional regardless of the Workbook Name? I know I probably need to replace the Nov 29th FINAL with something else I am just not sure what.
As ALWAYS, THANKS to anyone that can assist.
Bye 4 Now,
Mark
Sudbury, Ontario
I am new to VB and quite unfamiliar with the different commands. I am using the following code and was wondering if it could be adjusted.
Code:
Sub RestoreDepositForm()
' (FINAL)
Answer = MsgBox("WARNING! Do you really want to Restore The Deposit Form?" & vbCr & vbCr & "Doing so will DELETE the current Deposit Form and ALL its data.", vbOKCancel, "WARNING!")
If Answer = vbCancel Then Exit Sub
If Answer = vbOK Then
If Answer2 = vbCancel Then Exit Sub
End If
End Sub
What I want it to do is if the person clicks OK 9to delete) thean I want it to take them to cell " C3 " on the " Control Log " sheet
The other problem I am having with a code that was created (via macro) is that when I save my workbook with a diffeerent name it no longer functions.
'
' PrepareBankSummarySheet Macro
' Macro recorded 29/11/2005 (FINAL)
'
'
Range("F30").Select
Application.Run "'Nov 29th FINAL.xls'!ShowAllBankSummaryData"
Range("A2:C401").Select
Selection.FillDown
ActiveWindow.ScrollRow = 1
Range("A2").Select
Application.Run "'Nov 29th FINAL.xls'!HideBankSummaryData"
End Sub
Can this be tweaked to remain functional regardless of the Workbook Name? I know I probably need to replace the Nov 29th FINAL with something else I am just not sure what.
As ALWAYS, THANKS to anyone that can assist.
Bye 4 Now,
Mark
Sudbury, Ontario