ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SWhowing a data form using macro's (https://www.excelbanter.com/excel-programming/279590-swhowing-data-form-using-macros.html)

Mark Wake

SWhowing a data form using macro's
 
I have a series of spredsheets that are linked, with all
the data coming from the first sheet. Rather than go cell
by cell to enter the data, I have set up a data form.
Ihave tried to write a macro that opens the data form at
the click of a buuton but it keeps stopping.

Code so far is:-

Sheets("Registration").Select
Range("B5:Y750").Select
Range("B5:Y750").Activate
Sheets("Registration").ShowDataForm

It stops at the last line. IS the syntax incorrect?

John Green[_2_]

SWhowing a data form using macro's
 
ShowDataForm is a bit temperamental. You need to have your data range start in A1, A2, B1 or B2 except when you give it the name of
Database. In other words, use Insert|Name|Define and apply the name Database to your data range. Also, it is no longer necessary to
select a cell in the data range before showing the form.

--

John Green - Excel MVP
Sydney
Australia


"Mark Wake" wrote in message ...
I have a series of spredsheets that are linked, with all
the data coming from the first sheet. Rather than go cell
by cell to enter the data, I have set up a data form.
Ihave tried to write a macro that opens the data form at
the click of a buuton but it keeps stopping.

Code so far is:-

Sheets("Registration").Select
Range("B5:Y750").Select
Range("B5:Y750").Activate
Sheets("Registration").ShowDataForm

It stops at the last line. IS the syntax incorrect?




No Name

SWhowing a data form using macro's
 
Thanks
-----Original Message-----
ShowDataForm is a bit temperamental. You need to have

your data range start in A1, A2, B1 or B2 except when you
give it the name of
Database. In other words, use Insert|Name|Define and

apply the name Database to your data range. Also, it is no
longer necessary to
select a cell in the data range before showing the form.

--

John Green - Excel MVP
Sydney
Australia


"Mark Wake" wrote

in message ...
I have a series of spredsheets that are linked, with all
the data coming from the first sheet. Rather than go

cell
by cell to enter the data, I have set up a data form.
Ihave tried to write a macro that opens the data form at
the click of a buuton but it keeps stopping.

Code so far is:-

Sheets("Registration").Select
Range("B5:Y750").Select
Range("B5:Y750").Activate
Sheets("Registration").ShowDataForm

It stops at the last line. IS the syntax incorrect?



.



All times are GMT +1. The time now is 01:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com