Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default May I use a form in an add-in

I have an add-in that fetches data from a recordset in a given place in a sheet, and does this fine
I'd also like to have in the same add-in the database connection form, where the user enters the database name, user name & password. If I do import that form in the add-in, how may I call it and refer to fields in it, as long as I can't see any way to declare a form public

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default May I use a form in an add-in

Bede,

An add-in is just a workbook saved as an add-in. As such, it can have sheets
and forms which can be used as with any other workbook.

You would start in a macro with in the add-in with

Userform1.Show

as is normal.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"BEDE" wrote in message
...
I have an add-in that fetches data from a recordset in a given place in a

sheet, and does this fine.
I'd also like to have in the same add-in the database connection form,

where the user enters the database name, user name & password. If I do
import that form in the add-in, how may I call it and refer to fields in it,
as long as I can't see any way to declare a form public?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default May I use a form in an add-in

Thanx
I just found the way around it. The add-in definitely has no sheets, only some subs & functions in it are used from another VBA project. So, in order to show the form in the add-in I made a public sub in the add-in project, and, to refer the fields in the form, I made some getXXX public functions and some setXXX public subs

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
Formula (off form) that completes form data based on a result lldiel Excel Worksheet Functions 2 November 24th 09 11:09 PM
excel form. Need data extracted to spreadsheet each time a form co MikeR-Oz Excel Discussion (Misc queries) 4 April 5th 09 05:18 AM
Using a template form, advance a form number everytime you open ShoDan Excel Discussion (Misc queries) 1 January 31st 08 01:34 PM
Can a form made in Excel 2002 be converted into a fillable form? Paraclete Excel Discussion (Misc queries) 1 February 20th 07 09:20 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM


All times are GMT +1. The time now is 01:20 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"