| |

VerySource

 Forgot password?
 Register
Search
View: 737|Reply: 1

VBA novice problems when using the free function for the first time

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-9 07:00:01
| Show all posts |Read mode
Put a button on Excel's sheet1, and the event is as follows.

Private Sub CommandButton1_Click ()
Worksheets ("Sheet1"). Cells (2, 2) .Value = rand ()
End Sub

After running, I get the following error: "Compile error: Subroutine or function is not defined"

What's going on?
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-4-2 16:00:01
| Show all posts
rand () should be rnd ()
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list