Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
shajueasow
 
Posts: n/a
Default How to activate "new" tab in Dataform in EXCEL through VB

Hi,
Code:
Range("A1").Select
ActiveSheet.ShowDataForm

The above code shows up the dataform in an excel worksheet. But how it can
be written in such a way so that the data form is ready to accept new
record.(Or like the "New" tab clicked.) I hope the question is clear.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Maybe something like:

Option Explicit
Sub testme()

SendKeys "%w"
Application.DisplayAlerts = False
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True

End Sub

(The shortcut for a New record is alt-w (%w in Sendkeys syntax).)

shajueasow wrote:

Hi,
Code:
Range("A1").Select
ActiveSheet.ShowDataForm

The above code shows up the dataform in an excel worksheet. But how it can
be written in such a way so that the data form is ready to accept new
record.(Or like the "New" tab clicked.) I hope the question is clear.


--

Dave Peterson
  #3   Report Post  
shajueasow
 
Posts: n/a
Default

Thanks A lot Dave.
I was trying to get an answer for this for quite sometime. As I am new to
this forum I had made a mistake of posting the same question twice. Sorry for
that. Your work is well appreciated.

"Dave Peterson" wrote:

Maybe something like:

Option Explicit
Sub testme()

SendKeys "%w"
Application.DisplayAlerts = False
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True

End Sub

(The shortcut for a New record is alt-w (%w in Sendkeys syntax).)

shajueasow wrote:

Hi,
Code:
Range("A1").Select
ActiveSheet.ShowDataForm

The above code shows up the dataform in an excel worksheet. But how it can
be written in such a way so that the data form is ready to accept new
record.(Or like the "New" tab clicked.) I hope the question is clear.


--

Dave Peterson

Reply
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
Getting Excel Data from One Sheet to Another.... Robin Excel Discussion (Misc queries) 2 April 21st 05 01:15 PM
Stop Excel Rounding Dates leinad512 Excel Discussion (Misc queries) 1 April 20th 05 04:19 PM
Hints And Tips For New Posters In The Excel Newsgroups Gary Brown Excel Worksheet Functions 0 April 15th 05 05:47 PM
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 04:44 AM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 09:07 PM


All times are GMT +1. The time now is 09:31 PM.

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

About Us

"It's about Microsoft Excel"