DataForm Problem

Andywiz

Board Regular
Joined
May 25, 2005
Messages
238
Hello,

I'm having trouble with something very simple and cannot figure out why!

I'm replicating the Data > Form command using:

Code:
Range("b200").End(xlUp).Select
ActiveSheet.ShowDataForm

However, this fails to open the Data Form correctly, insisting that "Microsoft Excel cannot determine which row in your list or selection contains column labels", and thereby opening a DataForm that does not contain the correct fields for entry.

Normally, I understand this to mean that I don't have any column headers. However, I do, and in fact if I perform this manually by actually clicking Data > Form, it opens the data form correctly without problems.

Can anybody suggest why this might be happening and help me resolve it, please?

Many thanks in advance,
Andywiz :eek:
 
Greg Truby said:
Oh - good morning, Tom! Um, not following, what's the alt-N gonna do for us?
Good morning to you too Greg. It's gonna do nothing in the US. When I stuck that code in my library it was during a time when I was editing hundreds of macros by Hans Herber while working on the CD, and this %n was used in European macros to help call the dataform. I imagine this has significance with European keyboards (especially German and French from what I can gather) but I have never been able to test that. It has no value in America for Excel but does not do much damage either in code execution, just one SendKeys command, so I kept it in the code in case a user happens to be in Europe with the same problem. If anyone in Europe reads this I'd be interested to know what Alt+N does for Excel, maybe equivalent of Ctrl+O for Open (??).

Looks like Andrew nailed this one, thanks.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,216,172
Messages
6,129,290
Members
449,498
Latest member
Lee_ray

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