Run Time Error -2147024809 (80070057)

Mel Smith

Well-known Member
Joined
Dec 13, 2005
Messages
1,023
Office Version
  1. 365
Platform
  1. Windows
I have three command buttons all using virtually the same code, but calling different sheet numbers. The first two buttons work perfectly but the third keeps displaying this error code whenever I select a name in TextBox 1 which is the same function in the other two). Command button one calls sheets as "sheet_num = Array (1, 2, 3). Button two calls sheets as "sheet_num = Array (14, 5, 6) and button three calls sheets as "sheet_num = Array (7, 8, 9, 10, 11).

Can anyone suggest what I might be doing wrong?

Many thanks.

Mel
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
When de-bugging the follow line of code is highlighted:

Me.Controls("TextBox" & current_textBox).Value = .Cells(data_row, column_nums(i)) - although this line is the same as for the other two command buttons which work perfectly...

Mel
 
Upvote 0
Problem solved. One of the many text boxes had been removed (!?). Since I've replaced it and numbered it correctly, everything works. Every day's a school day!!
 
Upvote 0
Solution

Forum statistics

Threads
1,214,786
Messages
6,121,553
Members
449,038
Latest member
Guest1337

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top