Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in VB script for Excel

Status
Not open for further replies.

naikadit

Technical User
Jun 30, 2008
22
US
hi guys,

I need help in Vbscript I am writing a code which will show up errors in excel


Set objSheet = objExcel.ActiveWorkbook.Worksheets("RBS Site")
------------------------------------------------------------
if (Sheet4.Name <> "RBS Site" ) then

objtxtStream.Writeline "Error in RBS Site Tab"
end if
------------------------------------------------------------

if (objSheet.Cells(1,1).Value <> "rncId" ) then

objtxtStream.Writeline "Error in RBS Site : Cells(1,1)"
end if


Here RBS site is the tab name of the sheet and also it checks the columm names in the third part I want help in the second part I want to bascially see if the tab name is correct or not and if not then it should show error

I know I should write it befor the set obj command but i want to know how exactly I canwrite that.


Thansk for all your help,
 
What is Sheet4 ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Tip: Use the Option Explicit instruction.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top