Currently I have a macro that runs and updates a master file grabbing information from excel sheets on sharedrives.
How would one bypass prompts that aren't simply yes/no - One asks to update the information from the external file, and one prompt says its a different size than the clipboard the information is being copied to.
I want to bypass both of these prompts, and I think Boolean values would be involved I just wanted sure if True and False worked for prompts other than yes/no.
And if it's unable to update the data I wanted to add an IF Error to notify the user the data did not update.
Here's the macro in its current state - I assume the prompts for Boolean values would go after I set the wbk?:
How would one bypass prompts that aren't simply yes/no - One asks to update the information from the external file, and one prompt says its a different size than the clipboard the information is being copied to.
I want to bypass both of these prompts, and I think Boolean values would be involved I just wanted sure if True and False worked for prompts other than yes/no.
And if it's unable to update the data I wanted to add an IF Error to notify the user the data did not update.
Here's the macro in its current state - I assume the prompts for Boolean values would go after I set the wbk?:
HTML:
Sub CpyProdSch()
Dim wbk As Workbook
Dim strFileName As String
Dim strFilePath As String
strFilePath = "\\Ykf001\grpdata\PUBLIC\Operations\Converting Schedule\" 'constant
strFileName = Dir(strFilePath)
Set wbk = Workbooks.Open(strFilePath & strFileName, , True)
Worksheets(1).Activate
cells.Select
Range("BM1").Activate
Selection.Copy
Windows("Raw Data pRODUCTION.xlsx").Activate
Range("A1:C1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
wbk.Close False
Set wbk = Nothing
End Sub
Last edited: