Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I made a macro attached to a button on a worksheet to click
DataForms and go to a text formatted cell that has a label on the same page. The cells to the right of this cell also have labels so that the data form will show a list. When I click the button to start the macro I get a runtime error 1004 message if Range().Select is anything other than a1 or a2. Error reads "ShowDataForm method of Worksheet class failed". If I put the label in cells a1 or a2 it works fine but gives me a message before allowing me to continue. When I click OK it lets me continue and works fine. The message here reads: "MS Excel cannot determine which row in your list or selection contains column labels, which are required for this command. *If you want the first row of the selection or list used as labels and not as data, click OK. *If you selected a subset of cells in error, select a single cell, and try the command again. *To create column labels, click Cancel, and enter a text label at the top of each column of data. *For information about creating labels that are easy to detect, click Help." The situation at the first * above matches my situation, so I click OK. The macro code that works here is below: Sub CountDinners() ' ' CountDinners Macro ' Macro recorded 5/1/2004 by charles osborne ' ' Range("a2").Select ActiveSheet.ShowDataForm End Sub Any help is appreciated. If you like I can send file. Thanks! ~~Charles Osborne |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
runtime error '1004' | Excel Discussion (Misc queries) | |||
excel chart export error runtime 1004 | Charts and Charting in Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
runtime error 1004 when opening excel file via VBA in a browser | Excel Programming | |||
runtime error 1004 | Excel Programming |