web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PAD run vb script issue
Power Automate
Unanswered

PAD run vb script issue

(0) ShareShare
ReportReport
Posted on by 2

Dear,

 

I have been bothered by issue of running VB script through PAD. the vb script is used to highlight some cells.  The error message says object required: "objWorkbook" on line 4. My colleague in Asia tested the same code and had no error message as return. Could anyone help if there is really any error in my vb script? If there is no error, why objWorkbook is required?

 

set objExcel = GetObject(,"Excel.Application")
set objWorkbook =objExcel.ActiveWorkbook
objExcel.Application.Visible = True
set objWorksheet = objWorkbook.Worksheets("Sheet1")    '' error message refers to this line
objWorksheet.Cells("%LoopIndex%", 18).interior.color = 4

  • Jdelavega Profile Picture
    106 on at

    Hi @BQmz 

     

    Did you try this on the same workbook? Is the name of the worksheet correct?

  • BQmz Profile Picture
    2 on at

    what is the same workbook meant? The name of the worksheet is correct since I have examined it a couple of times

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard