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 show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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,891
Messages
6,122,105
Members
449,066
Latest member
Andyg666

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