0

The following code shows a syntax error. A compile error expecting an "=". Can't understand what the error is. Please help.

Creating a macro to open multiple password protected workbooks.

    Workbooks.Open(Filename:=myPath & myFile & myExtension, Password:=pw)

A compile error expecting an "=". Can't understand what the error is. Please help.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
bryan0920
  • 17
  • 5

1 Answers1

0

So we can mark this as answered (Chris Neilsen):

By adjusting the code from: Workbooks.Open(Filename:=myPath & myFile & myExtension, Password:=pw) to Workbooks.Open Filename:=myPath & myFile & myExtension, Password:=pw

The code runs fine now

Mark S.
  • 1,474
  • 1
  • 6
  • 20