win11 not working win 10 is

steve31

New Member
Joined
Dec 19, 2023
Messages
2
Office Version
  1. 2021
Platform
  1. Windows
compile error cant find project or library
its flagged (erow=)


Private Sub CommandButton9_Click()
If Range("a3") >= 1 And Range("A3") = 1 Then Range("B3:J3").Select
Selection.Copy

If Range("a3") >= 1 And Range("A4") = 2 Then Range("B3:J4").Select
Selection.Copy

If Range("a3") >= 1 And Range("A5") = 3 Then Range("B3:J5").Select
Selection.Copy

If Range("a3") >= 1 And Range("A6") = 4 Then Range("B3:J6").Select
Selection.Copy

If Range("a3") >= 1 And Range("A7") = 5 Then Range("B3:J7").Select
Selection.Copy

If Range("a3") >= 1 And Range("A8") = 6 Then Range("B3:J8").Select
Selection.Copy

If Range("a3") >= 1 And Range("A9") = 7 Then Range("B3:J9").Select
Selection.Copy

If Range("a3") >= 1 And Range("A10") = 8 Then Range("B3:J10").Select
Selection.Copy

If Range("a3") >= 1 And Range("A11") = 9 Then Range("B3:J11").Select
Selection.Copy


If Range("a3") >= 1 And Range("A12") = 10 Then Range("B3:J12").Select
Selection.Copy

Windows("Steve Purchase log.xlsm").Activate
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).row

ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
ActiveWorkbook.Save
Application.CutCopyMode = False
Unload Me

End Sub
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome to the Board!

Check for missing References/Libraries in VBA. Sometimes when you upgrade, you need to go back and re-select some.

I showed someone else how to do that earlier in the day today: Deprecated features and functions?
 
Upvote 0
Solution
Excellent!
Glad to hear that worked for you.
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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