LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default how to reference worksheet as control source with space in name

My worksheet was called "Audit Checklist" and in VBA I reffered to it as :
LearnerCount = Worksheets("Audit Checklist").Range("d2").Value

and all works fine.

I have created a userform now and wanted to amend some cells from selected
data so:

Private Sub UserForm_Initialize()
Me.CBCentre.ControlSource = "Audit Checklist!c4"
Me.CBStaffName.ControlSource = "Audit Checklist!P4"
End Sub

this caused ar error for the control source becuase it wanted:
"AuditChecklist!P4"

how do I reference without renaming the worksheet?

regards
peter


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax for control source in combo box control dhstein Excel Discussion (Misc queries) 1 August 12th 09 05:38 PM
How can I control space between lines in a text? Elfinka Excel Discussion (Misc queries) 2 March 16th 09 04:49 PM
Excel row space control. 1LMR Excel Discussion (Misc queries) 1 November 8th 08 11:12 PM
Control Source Dave D[_3_] Excel Programming 1 April 28th 04 07:20 PM
Control Source Steven Taylor[_2_] Excel Programming 0 July 16th 03 04:01 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"