New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Error in VBA script

Macros, VBA, Excel Automation, etc.

Error in VBA script

Postby Tim5071 » Thu Jan 05, 2012 9:27 am

I have this file that is supposed to do some calculations when you click on the different tabs after certain information is entered. This file supposedly worked fine until it was used in Excel 2010. When you click on the "Stage Out Pill" worksheet and the "Print Summary" worksheet it's supposed to do some calculations, but it opens the VB Editor and gives an error. Can someone help me with this. I'm new at using VBA and I haven't been able to figure this one out. Any assistance is GREATLY appreciated.

Tim C.
  • 0

You do not have the required permissions to view the files attached to this post.
Tim5071
Rookie
 
Posts: 5
Joined: Jan 5, 2012
Reputation: 0

Re: Error in VBA script

Postby charles » Thu Jan 05, 2012 11:52 am

Tim5071,

Welcome to the forum. When I looked at your project I received errors that indicated it was looking for a "Combo Box" In the worksheets I do not see the combo boxes.
  • 0

There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Error in VBA script

Postby Tim5071 » Thu Jan 05, 2012 1:54 pm

I kind of inherited this project and that's the hardest way to fix problems. If I would have created it (which I'm not that advanced yet) it would be much easier to troubleshoot it. If there is anything you can do to help, it would be GREATLY appreciated.
  • 0

Tim5071
Rookie
 
Posts: 5
Joined: Jan 5, 2012
Reputation: 0

Re: Error in VBA script

Postby charles » Thu Jan 05, 2012 2:22 pm

Tim,

I looked at the file using excel 2003 and do not receive errors, but the code looks for the combo boxes and from what i can see the sheets do not have any.
Can you explain what you are trying to do. You may have to revamp it to make it work.

Had to set the Security and now it's causing an error.
  • 0

There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Error in VBA script

Postby Tim5071 » Thu Jan 05, 2012 2:40 pm

I wish I could explain this form better. I know there are some places on the first tab (Well Info) and the second tab (Set Pill) that have to be filled in so the third tab (Stage Out Pill) will calculate. When the (Stage Out Pill) tab calculates, the (Print Summary) tab should populate. I don't know how the formula work or what makes this thing tick. Any guidance is greatly appreciate.
  • 0

Tim5071
Rookie
 
Posts: 5
Joined: Jan 5, 2012
Reputation: 0

Re: Error in VBA script

Postby charles » Thu Jan 05, 2012 3:48 pm

Tim,

I actually found the "Combobox1" it's in the Stage Out Sheet on row 81. Now I can change the value in it and it works 1 time and then fails. It fails because the formula in the cal sheet is looking for a value from the well info sheet. The value should be in "B10", but when the code runs at least 1 time the value in B10 changes to text "Set Well Info". Not knowing the procedure I may not be able to help.
  • 0

There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Error in VBA script

Postby Tim5071 » Thu Jan 05, 2012 4:52 pm

You've already made more progress than I did. I'll try to find out exactly how this is all supposed to work and get back to you. Not only is the VBA new to me, but this spreadsheet process is also new to me. All of these calculations are also new to me. I do appreciate all of your help. Hopefully, I'll be able to learn about more of this.
  • 0

Tim5071
Rookie
 
Posts: 5
Joined: Jan 5, 2012
Reputation: 0

Re: Error in VBA script

Postby charles » Thu Jan 05, 2012 5:18 pm

im,

Here's the copy I made change to. You can now use the "ComboBox" which is in row 81 of the "Stage Pill worksheet.
You will however receive errors. I'll continue to look at to see if I can stop the errors. Hope have better luck when you look at it.
  • 0

You do not have the required permissions to view the files attached to this post.
There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Error in VBA script

Postby charles » Fri Jan 06, 2012 12:43 pm

Tim,

I revamped the code and added info on the Pill sheet for your information. You can remove it.
  • 0

You do not have the required permissions to view the files attached to this post.
There are other ways too do this but...

Be kind let us know if you posted somewhere else!



Charles
charles
Excel Badass
 
Posts: 632
Joined: Dec 10, 2011
Location: Mississippi
Reputation: 1
Excel Version: Excel 2003, 2007 and Mac 2011

Re: Error in VBA script

Postby Tim5071 » Fri Jan 06, 2012 2:21 pm

I must be doing something wrong or I must have something set wrong in my Excel/VBA. I'm still getting the same error messages and I'm not getting any data to calculate. I do appreciate all of your help.
  • 0

Tim5071
Rookie
 
Posts: 5
Joined: Jan 5, 2012
Reputation: 0


Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 224 guests