Acts 7:42

But God turned [away from them] and allowed them to worship heavenly bodies [i.e., stars], just as it was written in the prophet [Amos 5:25ff], 'Did you offer me slain animals as sacrifices for forty years in the wilderness, you Israelites?

Acts 7:36

This man led them out [of Egypt], performing wonders and [miraculous] signs in Egypt, at the Red Sea and in the wilderness for forty years.

Romans 1:24-28

So, God allowed [or, abandoned] them to have the impure desires of their hearts, and to [practice] degrading behavior with their bodies among themselves.

2 Thessalonians 2:10-12

and all kinds of wicked deception toward those people who are perishing [spiritually], because they refused to love the truth so they could be saved.

Hebrews 3:9

where your forefathers tried me and tested [my patience] when they saw what I did for forty years.

Hebrews 3:15-17

As it has been said [Psa. 95:7], "Today, if you hear His [i.e., God's] voice, do not have a stubborn heart like you did when you provoked [God]."

Treasury of Scripture Knowledge

Summary

Then God turned, and gave them up to worship the host of heaven; as it is written in the book of the prophets, O ye house of Israel, have ye offered to me slain beasts and sacrifices by the space of forty years in the wilderness?

Of forty

Bible References

And gave

Romans 1:24
So, God allowed [or, abandoned] them to have the impure desires of their hearts, and to [practice] degrading behavior with their bodies among themselves.
2 Thessalonians 2:10
and all kinds of wicked deception toward those people who are perishing [spiritually], because they refused to love the truth so they could be saved.

Of forty

Hebrews 3:9
where your forefathers tried me and tested [my patience] when they saw what I did for forty years.