Question on Events and Procedure - Workbook_Open

USFengBULLS

Board Regular
Joined
May 7, 2018
Messages
66
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I am trying to have three cells filled on a particular sheet when a user opens the workbook every time. Here is the sub getting the values, which in in my module 1
Public Sub Project_Info()


Dim P_Number As Range, P_Name As Range, GC As Range


Set P_Number = Sheets("CO LOG").Range("B4")
Set P_Name = Sheets("CO LOG").Range("D4")
Set GC = Sheets("CO LOG").Range("GC") 'GC is merged cell of G4,H4 & I4


End Sub

When I go to my This Workbook Object and Procedure Open I have this coded
Private Sub Workbook_Open()
Sheets("NEW FORM-RESET").Activate


Call Project_Info
ActiveSheet.Range("B3") = P_Name
ActiveSheet.Range("B4") = P_Number
ActiveSheet.Range("B5") = GC


End Sub

When I run this Procedure/Event it does take me to that "New Form-Reset" (which is just a form) but it does not fill the three ranges with the contents of the cells from the other sheet that is in the Public Sub Project_Info () procedure that I wrote in my Module 1.

Anyone know what I am doing wrong? and if possible can you please explain a little more on how to call procedures from other procedures or an event?
I'm am practicing programming efficiency by writing multiple smaller procedures in the modules and then just using the Call function to run them in a an event or another procedure higher up...Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

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