dot - what before?

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,835
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Often googling for a solution show things like
Code:
.ForeColor.RGB = RGB( _
                     Sheets(1).Cells(4, 4), _
                     Sheets(1).Cells(4, 5), _
                     Sheets(1).Cells(4, 6) _
                     )

How do you find or work out what goes before the "." ?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Look for a line that says 'With variableName'. That variable is what goes before the ".".
 
Upvote 0
Yes, but if that's missing? I mean where can one look for ".Forecolor" to find what can come before it?
I know there's millions of them but are they documented anywhere?
 
Upvote 0
Forecolor probably refers to a textbox on a userform, and it's using the rgb values from the sheet cells to set the color.
 
Upvote 0
If you go into the VBA editor, hit F2, and search for forecolor, you will see all the things that can come before .forecolor.
 
Upvote 0
If there's no With then the code won't compile, you'll get an 'Invalid or unqualified reference' error.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

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