When the Broadway musical version of “9 to 5” opened Thursday, it was all a little surreal for Patricia Resnick, the co-screenwriter of the pic and the book writer of the tuner.

“I have to say, this sounds like a weird thing you tell your therapist,” she said, addressing the aud during the curtain call. ” ‘I had a dream I wrote a Broadway show, and I was standing next to Dolly Parton!’ ”

“We’re just tickled to death,” added the aforementioned Parton, the musical’s composer, on her way in to the opening night party.

Parton said she had such a good time with “9 to 5,” she’s already thinking about writing an original score for a new musical based on her life.

Maybe Megan Hilty, who portrays Parton’s “9 to 5” character onstage, could play the role.

“But I was never that cute!” Parton said with a laugh.