I am finding a lot of informtion about how to create named ranges and scope them Workbook or Worksheet. But I must be misunderstanding something bout how to reference them in the VBA procedures:
I have Active X checkbox that when clicked, I want to display 5 rows and select a particular field.
I tried to use a named range for the rows and when that code ran, it said an object was needed. i fiddled by prefixing with worksheet name, etc...finally went with actual range and deleted the name which had referenced the 5 rows. That worked.
Thought I could at least use a named range for the select (wanted some success with the technique)...but this code isnt working:
Private Sub chkUploadtoCCRMSharepointSite_Click()
If chkUploadtoCCRMSharepointSite = False Then 'Hide Them
Range("32:36").EntireRow.Hidden = True
Else
Range("32:36").EntireRow.Hidden = False
Sharepoint_Project_Application.Select
End If
End Sub
Sharepoint_Project_Application is the named range for one cell defined absolutely. It has Workbook scope. In Name Manager, I can see the value for it.
This procedure is on the worksheet page- same worksheet where th cell is.
Error message indicates object is needed for the select line- I must not be referencing the cell correctly. Cant seem to see value in Watch window. Have been fiddling with ways to reference it, and looking for examples---any help appreciated- thank you!
using Excel 2007
I have Active X checkbox that when clicked, I want to display 5 rows and select a particular field.
I tried to use a named range for the rows and when that code ran, it said an object was needed. i fiddled by prefixing with worksheet name, etc...finally went with actual range and deleted the name which had referenced the 5 rows. That worked.
Thought I could at least use a named range for the select (wanted some success with the technique)...but this code isnt working:
Private Sub chkUploadtoCCRMSharepointSite_Click()
If chkUploadtoCCRMSharepointSite = False Then 'Hide Them
Range("32:36").EntireRow.Hidden = True
Else
Range("32:36").EntireRow.Hidden = False
Sharepoint_Project_Application.Select
End If
End Sub
Sharepoint_Project_Application is the named range for one cell defined absolutely. It has Workbook scope. In Name Manager, I can see the value for it.
This procedure is on the worksheet page- same worksheet where th cell is.
Error message indicates object is needed for the select line- I must not be referencing the cell correctly. Cant seem to see value in Watch window. Have been fiddling with ways to reference it, and looking for examples---any help appreciated- thank you!
using Excel 2007