Referencing a Forms Button in a Worksheet

I have little experience with Forms controls on worksheets.  I have a piece 
of code that should disable or enable a Forms command button on 
Sheets("QUOTE") depending on a value in a cell (True or False).  The command 
buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the 
Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!

' fill array with all users information
aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value

' enable/disable Edit Add-In button
Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1, 
6))
-- 
Cheers,
Ryan
0
Utf
12/29/2009 6:22:01 PM
excel.programming 6508 articles. 2 followers. Follow

7 Replies
617 Views

Similar Articles

[PageSpeed] 54

First, it's .enabled (with a D)

Second, change the name of the button by replacing the dash with an underscore. 
(don't forget to fix the code, too.)

Then try it.

Ryan H wrote:
> 
> I have little experience with Forms controls on worksheets.  I have a piece
> of code that should disable or enable a Forms command button on
> Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> 
> ' fill array with all users information
> aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> 
> ' enable/disable Edit Add-In button
> Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> 6))
> --
> Cheers,
> Ryan

-- 

Dave Peterson
0
Dave
12/29/2009 6:31:54 PM
Oops, sorry for the misspelling.  I didn't cut and paste my code like I 
should have.  I changed the name of the button to cmbEditAddIn and this code 
works great!  Why didn't it throw an error with the "-" in the name?

                ' enable/disable Edit Add-In button
                With .Buttons("cmbEditAddIn")
                
                    .Enabled = CBool(aryUserInfo(1, 6))
                    
                    If CBool(aryUserInfo(1, 6)) Then
                        .Font.ColorIndex = xlAutomatic  'black
                    Else
                        .Font.ColorIndex = 48           'grey
                    End If
                End With
-- 
Cheers,
Ryan


"Dave Peterson" wrote:

> First, it's .enabled (with a D)
> 
> Second, change the name of the button by replacing the dash with an underscore. 
> (don't forget to fix the code, too.)
> 
> Then try it.
> 
> Ryan H wrote:
> > 
> > I have little experience with Forms controls on worksheets.  I have a piece
> > of code that should disable or enable a Forms command button on
> > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > 
> > ' fill array with all users information
> > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > 
> > ' enable/disable Edit Add-In button
> > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > 6))
> > --
> > Cheers,
> > Ryan
> 
> -- 
> 
> Dave Peterson
> .
> 
0
Utf
12/29/2009 7:22:01 PM
Did you mean "why did it throw an error with the "-" in the name?"

I'd guess that names that contain the hyphens are illegal.  (Not really going
out on a limb for that, huh?)

Ryan H wrote:
> 
> Oops, sorry for the misspelling.  I didn't cut and paste my code like I
> should have.  I changed the name of the button to cmbEditAddIn and this code
> works great!  Why didn't it throw an error with the "-" in the name?
> 
>                 ' enable/disable Edit Add-In button
>                 With .Buttons("cmbEditAddIn")
> 
>                     .Enabled = CBool(aryUserInfo(1, 6))
> 
>                     If CBool(aryUserInfo(1, 6)) Then
>                         .Font.ColorIndex = xlAutomatic  'black
>                     Else
>                         .Font.ColorIndex = 48           'grey
>                     End If
>                 End With
> --
> Cheers,
> Ryan
> 
> "Dave Peterson" wrote:
> 
> > First, it's .enabled (with a D)
> >
> > Second, change the name of the button by replacing the dash with an underscore.
> > (don't forget to fix the code, too.)
> >
> > Then try it.
> >
> > Ryan H wrote:
> > >
> > > I have little experience with Forms controls on worksheets.  I have a piece
> > > of code that should disable or enable a Forms command button on
> > > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > >
> > > ' fill array with all users information
> > > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > >
> > > ' enable/disable Edit Add-In button
> > > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > > 6))
> > > --
> > > Cheers,
> > > Ryan
> >
> > --
> >
> > Dave Peterson
> > .
> >

-- 

Dave Peterson
0
Dave
12/29/2009 8:28:01 PM
Thanks for the reply Dave.  I realize "-" are not allowed, but it did NOT 
throw an error when I assigned a name to the forms button on the worksheet, 
weird huh?  This what I did.

I drew the forms button on the worksheet, didn't assign a macro, but made 
sure the button was still selected.  Then I put Selection.Name = "Edit 
Add-In" in the Immediate Window and bang, it worked!  Why?  I think I missing 
something here.
-- 
Cheers,
Ryan


"Dave Peterson" wrote:

> Did you mean "why did it throw an error with the "-" in the name?"
> 
> I'd guess that names that contain the hyphens are illegal.  (Not really going
> out on a limb for that, huh?)
> 
> Ryan H wrote:
> > 
> > Oops, sorry for the misspelling.  I didn't cut and paste my code like I
> > should have.  I changed the name of the button to cmbEditAddIn and this code
> > works great!  Why didn't it throw an error with the "-" in the name?
> > 
> >                 ' enable/disable Edit Add-In button
> >                 With .Buttons("cmbEditAddIn")
> > 
> >                     .Enabled = CBool(aryUserInfo(1, 6))
> > 
> >                     If CBool(aryUserInfo(1, 6)) Then
> >                         .Font.ColorIndex = xlAutomatic  'black
> >                     Else
> >                         .Font.ColorIndex = 48           'grey
> >                     End If
> >                 End With
> > --
> > Cheers,
> > Ryan
> > 
> > "Dave Peterson" wrote:
> > 
> > > First, it's .enabled (with a D)
> > >
> > > Second, change the name of the button by replacing the dash with an underscore.
> > > (don't forget to fix the code, too.)
> > >
> > > Then try it.
> > >
> > > Ryan H wrote:
> > > >
> > > > I have little experience with Forms controls on worksheets.  I have a piece
> > > > of code that should disable or enable a Forms command button on
> > > > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > > > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > > > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > > >
> > > > ' fill array with all users information
> > > > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > > >
> > > > ' enable/disable Edit Add-In button
> > > > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > > > 6))
> > > > --
> > > > Cheers,
> > > > Ryan
> > >
> > > --
> > >
> > > Dave Peterson
> > > .
> > >
> 
> -- 
> 
> Dave Peterson
> .
> 
0
Utf
12/30/2009 12:54:01 PM
I don't have an answer for that.  To me, it appears to be a bug.

Ryan H wrote:
> 
> Thanks for the reply Dave.  I realize "-" are not allowed, but it did NOT
> throw an error when I assigned a name to the forms button on the worksheet,
> weird huh?  This what I did.
> 
> I drew the forms button on the worksheet, didn't assign a macro, but made
> sure the button was still selected.  Then I put Selection.Name = "Edit
> Add-In" in the Immediate Window and bang, it worked!  Why?  I think I missing
> something here.
> --
> Cheers,
> Ryan
> 
> "Dave Peterson" wrote:
> 
> > Did you mean "why did it throw an error with the "-" in the name?"
> >
> > I'd guess that names that contain the hyphens are illegal.  (Not really going
> > out on a limb for that, huh?)
> >
> > Ryan H wrote:
> > >
> > > Oops, sorry for the misspelling.  I didn't cut and paste my code like I
> > > should have.  I changed the name of the button to cmbEditAddIn and this code
> > > works great!  Why didn't it throw an error with the "-" in the name?
> > >
> > >                 ' enable/disable Edit Add-In button
> > >                 With .Buttons("cmbEditAddIn")
> > >
> > >                     .Enabled = CBool(aryUserInfo(1, 6))
> > >
> > >                     If CBool(aryUserInfo(1, 6)) Then
> > >                         .Font.ColorIndex = xlAutomatic  'black
> > >                     Else
> > >                         .Font.ColorIndex = 48           'grey
> > >                     End If
> > >                 End With
> > > --
> > > Cheers,
> > > Ryan
> > >
> > > "Dave Peterson" wrote:
> > >
> > > > First, it's .enabled (with a D)
> > > >
> > > > Second, change the name of the button by replacing the dash with an underscore.
> > > > (don't forget to fix the code, too.)
> > > >
> > > > Then try it.
> > > >
> > > > Ryan H wrote:
> > > > >
> > > > > I have little experience with Forms controls on worksheets.  I have a piece
> > > > > of code that should disable or enable a Forms command button on
> > > > > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > > > > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > > > > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > > > >
> > > > > ' fill array with all users information
> > > > > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > > > >
> > > > > ' enable/disable Edit Add-In button
> > > > > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > > > > 6))
> > > > > --
> > > > > Cheers,
> > > > > Ryan
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > > > .
> > > >
> >
> > --
> >
> > Dave Peterson
> > .
> >

-- 

Dave Peterson
0
Dave
12/30/2009 2:17:30 PM
When you find something like this, should I notify Microsoft or let it be?
-- 
Cheers,
Ryan


"Dave Peterson" wrote:

> I don't have an answer for that.  To me, it appears to be a bug.
> 
> Ryan H wrote:
> > 
> > Thanks for the reply Dave.  I realize "-" are not allowed, but it did NOT
> > throw an error when I assigned a name to the forms button on the worksheet,
> > weird huh?  This what I did.
> > 
> > I drew the forms button on the worksheet, didn't assign a macro, but made
> > sure the button was still selected.  Then I put Selection.Name = "Edit
> > Add-In" in the Immediate Window and bang, it worked!  Why?  I think I missing
> > something here.
> > --
> > Cheers,
> > Ryan
> > 
> > "Dave Peterson" wrote:
> > 
> > > Did you mean "why did it throw an error with the "-" in the name?"
> > >
> > > I'd guess that names that contain the hyphens are illegal.  (Not really going
> > > out on a limb for that, huh?)
> > >
> > > Ryan H wrote:
> > > >
> > > > Oops, sorry for the misspelling.  I didn't cut and paste my code like I
> > > > should have.  I changed the name of the button to cmbEditAddIn and this code
> > > > works great!  Why didn't it throw an error with the "-" in the name?
> > > >
> > > >                 ' enable/disable Edit Add-In button
> > > >                 With .Buttons("cmbEditAddIn")
> > > >
> > > >                     .Enabled = CBool(aryUserInfo(1, 6))
> > > >
> > > >                     If CBool(aryUserInfo(1, 6)) Then
> > > >                         .Font.ColorIndex = xlAutomatic  'black
> > > >                     Else
> > > >                         .Font.ColorIndex = 48           'grey
> > > >                     End If
> > > >                 End With
> > > > --
> > > > Cheers,
> > > > Ryan
> > > >
> > > > "Dave Peterson" wrote:
> > > >
> > > > > First, it's .enabled (with a D)
> > > > >
> > > > > Second, change the name of the button by replacing the dash with an underscore.
> > > > > (don't forget to fix the code, too.)
> > > > >
> > > > > Then try it.
> > > > >
> > > > > Ryan H wrote:
> > > > > >
> > > > > > I have little experience with Forms controls on worksheets.  I have a piece
> > > > > > of code that should disable or enable a Forms command button on
> > > > > > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > > > > > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > > > > > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > > > > >
> > > > > > ' fill array with all users information
> > > > > > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > > > > >
> > > > > > ' enable/disable Edit Add-In button
> > > > > > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > > > > > 6))
> > > > > > --
> > > > > > Cheers,
> > > > > > Ryan
> > > > >
> > > > > --
> > > > >
> > > > > Dave Peterson
> > > > > .
> > > > >
> > >
> > > --
> > >
> > > Dave Peterson
> > > .
> > >
> 
> -- 
> 
> Dave Peterson
> .
> 
0
Utf
12/30/2009 2:58:01 PM
It's up to you.  I'm sure there's a link somewhere on their site to report
problems.  Somewhere.

Ryan H wrote:
> 
> When you find something like this, should I notify Microsoft or let it be?
> --
> Cheers,
> Ryan
> 
> "Dave Peterson" wrote:
> 
> > I don't have an answer for that.  To me, it appears to be a bug.
> >
> > Ryan H wrote:
> > >
> > > Thanks for the reply Dave.  I realize "-" are not allowed, but it did NOT
> > > throw an error when I assigned a name to the forms button on the worksheet,
> > > weird huh?  This what I did.
> > >
> > > I drew the forms button on the worksheet, didn't assign a macro, but made
> > > sure the button was still selected.  Then I put Selection.Name = "Edit
> > > Add-In" in the Immediate Window and bang, it worked!  Why?  I think I missing
> > > something here.
> > > --
> > > Cheers,
> > > Ryan
> > >
> > > "Dave Peterson" wrote:
> > >
> > > > Did you mean "why did it throw an error with the "-" in the name?"
> > > >
> > > > I'd guess that names that contain the hyphens are illegal.  (Not really going
> > > > out on a limb for that, huh?)
> > > >
> > > > Ryan H wrote:
> > > > >
> > > > > Oops, sorry for the misspelling.  I didn't cut and paste my code like I
> > > > > should have.  I changed the name of the button to cmbEditAddIn and this code
> > > > > works great!  Why didn't it throw an error with the "-" in the name?
> > > > >
> > > > >                 ' enable/disable Edit Add-In button
> > > > >                 With .Buttons("cmbEditAddIn")
> > > > >
> > > > >                     .Enabled = CBool(aryUserInfo(1, 6))
> > > > >
> > > > >                     If CBool(aryUserInfo(1, 6)) Then
> > > > >                         .Font.ColorIndex = xlAutomatic  'black
> > > > >                     Else
> > > > >                         .Font.ColorIndex = 48           'grey
> > > > >                     End If
> > > > >                 End With
> > > > > --
> > > > > Cheers,
> > > > > Ryan
> > > > >
> > > > > "Dave Peterson" wrote:
> > > > >
> > > > > > First, it's .enabled (with a D)
> > > > > >
> > > > > > Second, change the name of the button by replacing the dash with an underscore.
> > > > > > (don't forget to fix the code, too.)
> > > > > >
> > > > > > Then try it.
> > > > > >
> > > > > > Ryan H wrote:
> > > > > > >
> > > > > > > I have little experience with Forms controls on worksheets.  I have a piece
> > > > > > > of code that should disable or enable a Forms command button on
> > > > > > > Sheets("QUOTE") depending on a value in a cell (True or False).  The command
> > > > > > > buttons name is Edit_Add-In.  I am getting an error saying "Unable to get the
> > > > > > > Buttons property of the Worksheets class".  Any ideas?  Thanks in Advance!
> > > > > > >
> > > > > > > ' fill array with all users information
> > > > > > > aryUserInfo = Range(Cells(1, "B"), Cells(1, "G")).Value
> > > > > > >
> > > > > > > ' enable/disable Edit Add-In button
> > > > > > > Error>>Sheets("QUOTE").Buttons("Edit_Add-In").Enable = CBool(aryUserInfo(1,
> > > > > > > 6))
> > > > > > > --
> > > > > > > Cheers,
> > > > > > > Ryan
> > > > > >
> > > > > > --
> > > > > >
> > > > > > Dave Peterson
> > > > > > .
> > > > > >
> > > >
> > > > --
> > > >
> > > > Dave Peterson
> > > > .
> > > >
> >
> > --
> >
> > Dave Peterson
> > .
> >

-- 

Dave Peterson
0
Dave
12/30/2009 3:00:13 PM
Reply:

Similar Artilces:

Form display
Hello, I have created a form in Access for users to use. My form is about 6" x 6". Everytime I double click the Access file to open, I setup the form to be automatically opened. But the Access backgroud is also displayed. Is there a way to not show the Access background? To make it more like a real application. thanks. In startup options (Tools--Startup), uncheck 'display database window'. This is for version 2003. -- Dorian "Give someone a fish and they eat for a day; teach someone to fish and they eat for a lifetime". "Boon"...

Search information using the main form
I am making a access db with a main form and linked a subform. I can show the record by entering the primary key in the main form and the subform will show the relevant information --- that is ok! But i try to enter infomation in the other text box in main form but no action only the table content changed! ---- problem How to use the other text boxes to search the record and the result can be seen in main form and of course related record will be shown in the sub-form as using the primary key. How to prevent the content to be changed as mentioned but only after the button will created lat...

"News" Button Missing
While trying to add the "News" button to the drop-down "Go" menu in Outlook 2003, the News button disappeared. Now we cannot find it anywhere. This means we cannot run Outlook's News Reader, apparently. I cannot find any guidance on the MS site on how to restore a lost "button." Where do missing buttons go? Is there a button lost-and-found? Can I get a new one? Try the following -- it seems to work for many: To get the News command back, go back to the Programs tab in Control Panel | Internet Options and change the default newsreader to Outlook Expre...

Making a Time book Form
I'm creating a time book in access to record Shift work and time off and such things. so far everything seems Ok but the Form. i need the Form to lay out as a Biweekly calender, dates across the top employees down the left side. The User puts in a Payperiod Number and the rest of the Form populates on Refresh and the user can make adjustments. I can't seem to find away to make it work. Does any one have any suggestions? Have a look at the Flex Grid Demo program at :- http://www.rogersaccesslibrary.com/forum/forum_topics.asp?FID=21&SID=5debzz2c87c6957859f13b1d2zcccf...

Print all records on Form
I am having a problem. I created a main form that filters many different options and then opens another form. From there the user can double click any record to get more detail, but I would like to also give them the option to print only the records on the form as well in a report. But everytime I click the button to print the report all the records from the query print. Not just my filtered records. Can anyone help me? Thanks! You can apply the form's filter to the report by putting code like this in the Click event procedure of a command button on your form: Dim strW...

Problem rearranging worksheets
I have Excel 2003 and have a workbook with several worksheets. I am trying to rearrange the worksheets in a different order, but the option to move is greyed out and it will not let me just click and drag either. Any suggestions? The workbook is not protected. Thank you in advance for your help Hi , Does the workbook have any macros in it that are preventing you or did you have any more workbooks open that have/had macros in them that are preventing you. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/excel-new/200908/1 No there are no macros. Thank yo...

Controlling display of forms
Hi, I'm trying to control what parts of a form are visible or not depending on the user of the computer. I've managed to find and adapt some code to tell me who the user is and I have a table set up with user names and a permission level (1 or 0) I can manually alter the On_Load event of my form to hide the parts I want (tabs) Can anybody help me out with putting it all together so that the forms On_Load event looks at GetUserName function which looks at the UserPermissions table and sets Visible True or False accordingly. This is taking me so long and it looks like it ought ...

Copyrighting an Excel worksheet
I designed a worksheet at work to make my work easier. In a meeting, told that I made myself an excel work sheet. Now everyone would lik to use it. Can I copyright this work sheet so that it can be m creation? If so, how. It's got to be more then to just to put th copyright symbol on the sheet -- Message posted from http://www.ExcelForum.com As far as the UK is concerned, and possibly other countries, an intellectual property which was created during your employment belong to your company. This can also include any that you create in you spare time. hth Mik -- Message posted fr...

Why does Option Button not hold transparent property?
I want the Option Button from the Control Toolbox to maintain it's transparent property. I have a colored cell behind the button and want the botton to be transpartent so the color is visable, however once I click on the button it turns white eventhough I have designated it as transparent. Any suggestions? Looks like a bug to me. Unless you can switch to a Forms toolbar option button you might have to make the option button opaque and set its backcolor to match the cell's. -- Jim "ARB" <ARB@discussions.microsoft.com> wrote in message news:76E278EF-33DD-4E8D...

Referencing a cell containing a graphic
I have a spreadsheet that has some fields that contain .BMP graphics. I need to copy the contents of a cell containing a graphic to another worksheet in the same workbook. For instance, Cell A1 in Sheet1 contains a BMP image. I also want this image to show up in Cell A1 of Sheet 2. I have tried the formula =sheet1!$a$1 in cell A1 of Sheet2, but all I get is a value of '0' Any help would be appreciated. You have to copy and paste the .BMP graphic to the cell A1 in sheet 2. Don't use the formula as the .BMP graphic is not included in the cell, it just covers the cell ...

posting multiple worksheet .xls on webpage
I've run into a slight problem trying to post an excel spreadsheet to a webpage. The spreadsheet has 6 worksheets. I've placed a link to the .xls file in the webpage. If the user clicks on the link (to open the file), he/she only sees the first worksheet. If, however, he/she downloads the file by right-clicking the link and choosing to save the file, the entire file is downloaded, and the user can then see all worksheets. Why is this occurring, and what can I do to change this behavior? Thanks, Steve -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com...

Why do forms sometimes minimize on their own?
I have 2 forms. The first one is opened with docmd.maximize. I click on a button on this form which opens a second form. I do some stuff and then I close the second form. The first form is still there but it appears as if it has shrunk some and is not maximized in the database pane. How can I correct this? Robert The standard Windows behaviour for an MDI application (which is what Access is) is that *all* windows are maximised, or they are *all* 'normal'. If you 'restore' a maximised window to it's 'normal' size, then all other maximised windows w...

command button to email form
Hi there I am trying to email a form with a command button that uses Outlook to email. I am using the following code: Private Sub btnEMAIL1_Click() Dim mess_body As String Dim rst As DAO.Recordset Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) Set rst = Form_F_People_Mailings.RecordsetClone rst.MoveFirst Do While Not rst.EOF If IsNull(rst!Email) Then MsgBox "skipping " & _ Form_F_People_Mailings.LastName & _ " no email address....

Voting Buttons -- Missing drop-down box in Tracking tab
I have a user on Office 2003 who uses voting buttons in Outlook. She claims that on the Tracking tab of her sent message, a drop-down box should appear at the right side of each user's "response" column showing the voting options -- for her to manually populate if the respondent verbally replies to her. Our outlook 2003 does not have this. I can find nothing on it. What is she talking about, and how can I set up this feature for her? -- Lisa M I think she's wrong. That function exists in a Meeting's Tracking table, not a vote related tracking table from an em...

Button background
Hello, I need to change background color of single button (CButton) in dialog. How can it be easily done? Thank you! >I need to change background color of single button (CButton) in dialog. How >can it be easily done? It can't be easily done. I believe the only option is to make it an owner drawn control. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq ...

referencing a workbook using string var = error9
I'm getting a subs out of range error for the following (section taken from sub)- For j = 1 To 4 c = "dataname" & Format(j) If j = 1 Or j = 2 Then u = v Else u = "TOTAL DATA" MsgBox c 'first iter gives dataname1 as i would expect MsgBox u 'first iter gives worksheet name in v as i would expect MsgBox Workbooks(c).Worksheets(u).Name 'generates error 9 Exit Sub With Workbooks(c).Worksheets(u) 'generates error 9 .Cells(1, 1).Value = "p" .Cells(1, 2).Value = "q .Cells(1, 3).Value = "r" ...

Summarizing Worksheets
I have multiple worksheets. Each worksheet has a list of employees and one of three possible shifts. I would like to create a summary worksheet that has three columns, one for each shift, and the names of all employees that work that shift. Hi could you provide some more detail about your data sheets (some example rows as plain text?) -- Regards Frank Kabel Frankfurt, Germany Don wrote: > I have multiple worksheets. Each worksheet has a list of employees > and one of three possible shifts. I would like to create a summary > worksheet that has three columns, one for each shift,...

Form Opening with Blank Column(s)
I have created a couple applications that are working well on our remote access server, Access 2003. However, when I have people put the application on there standard desktop on the network, one or more columns appear blank when the form is opened in Access 2003. Any ideas why the data retrieval or function would change between our server addition of Access vs client workstations? -- Message posted via http://www.accessmonster.com I have one user in my organization that is experiencing this problem also. The problem started the week of the 25th of February. The user could not give me a ...

how to prevent a formula in a summary sheet from automatically updating when a row is addedto the referenced sheet
I have a workbook set up that consists of several sheets and a summary sheet that refers to the third row on every other sheet. The worksheets that are referenced contain dated information that is sorted with the most recent entries entered in row 3 and these are the entries I need to track in the summary sheet. When I insert a new row 3 in these worksheets, the formula in the summary automatically updates to line 4 and I need it to always reference row 3, the newest entry. This should be simple but I cannot find the solution. Any ideas? Thanks, krisp1950 You could use the INDIRECT fun...

Using Access Forms On the Web
I have never developed an Access DB for online use. I would like to develope some Access Forms to collect information OnLine. I am told by my IT department that ASP is required to get Forms working on line and we don't use ASP. However our Training Department is telling me otherwise, saying that ASP is NOT required to put forms designed in Access on to a web server. Could someone please clarify this for me? I can easily create a form in Access to collect user input. I want to put that form Online. Thank you very much for any input. On Fri, 20 Nov 2009 13:04:52 -0500, &q...

linked Forms
I have a form linked to my main data entry form via a command button. How do i get it to display a "blank" or new form for data entry when I click the button and the form opens? Currently when the button is clicked it opens the form and it is displaying the first record and you have to click the add new or scroll all the way through the records in order to add a new one. =?Utf-8?B?U2FyYWhK?= <SarahJ@discussions.microsoft.com> wrote in news:A0B2C476-13EC-4F5D-A1E2-62183740DB4F@microsoft.com: > I have a form linked to my main data entry form via a command > button...

news button in outlook 2003 missing
I just loaded outlook 2003 on my system and the "news" button is missing from the category group on the standard toolbar. Can anyone tell me how to get that button back so I can set up my newsgroups. Set Outlook Express as your default newsreader in Control Panel-> Internet Options-> tab Programs. Also see; http://www,howto-outlook.com/faq/news.htm -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Navigation Pane Tips & Tricks -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Jacxg" <jgrody@nciinc.com> wrot...

adding data to a table via form
I have a command button that open a form that will allow user to add a new make and/or model of car. Adding a model requires typing in the new model name and then selecting the apporpriate make to tie it two. This works well. My question is if I need to add a new make of car then model my new make does not show unless I close and reopen the forms. The make of car is keep in table called (creatively) make. The model is stored in table model. I guess I am asking is there a refresh/forced update I can put in say the after update property? Your form is set to [data entry] if y...

Code Snippet of Display Text on Button Control
Hi, I want to display a text on a button which is dragged from the toolbox and placed on the dialog. I have posted a message regarding this ----> "Displaying text on a controls" I got the reply. But it is not still working Here is the code snippet..... MyApplicationDlg.h CButton m_button_control; MyApplicationDlg.cpp void CMyApplicationDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_BUTTON_TEST, m_button_control); } BOOL CMyApplicationDlg::OnInitDialog() { CDialog::OnInitDialog(); (GetDlgItem(IDC_BUTTON1))->SetW...

How to increase the maximum rows in the worksheet?
Hi, I am using Excel97 and I try to create a pivot table getting external data form Ms Access. In Access, my database has over 120,000 records equivalent to 120,000 rows in Excel. I noticed that Excel has only 65536 rows in each worksheet. How can I increase this maximum rows so that could I paste the 120,000 records onto the worksheet? Thanks :) -- ken2005 ------------------------------------------------------------------------ ken2005's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24734 View this thread: http://www.excelforum.com/showthread.php?threadid=3...