Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David494
 
Posts: n/a
Default input box = formula bar


Hey

I'm quite new to this VBAing in Access and I'm having a bit of a
problem here.

I have coding which allows an input box to appear when a button is
pressed......

Dim varInput As String

varInput = InputBox("Select your cell?")


First I would like the user to click on a cell to populate the formula
bar with the text they want to search for. Then they click on the
button and the input box pops up. However I want the input box to be
populated with the text from the formula bar.

Is this at all possible?

Cheers

Dave


--
David494
------------------------------------------------------------------------
David494's Profile: http://www.excelforum.com/member.php...o&userid=24482
View this thread: http://www.excelforum.com/showthread...hreadid=391278

  #2   Report Post  
FSt1
 
Posts: n/a
Default

hi,
I'm having a little trouble understanding why you would want to do it that
way.
you can get your variable from the sheet.

dim varinput as string
varInput = Range("A1").value

IF the user types in a value in a cell(which populates the fomula bar), the
input box becomes unneccessary.

but if you want to put the user's input on the sheet from the input box do
this

Dim varInput As String
varInput = InputBox("input something?")
Range("A1").value = varinput.value

this will populate cell A1 (and the formula bar) then you can use the use's
input into the inputbox for the rest of your macro.
Remember, the formula bar just displays the contents of the activecell.
techniquely there is no data in the formual bar. it displays a formula as
written (or data if no formula) while the sheet display the product of the
formula (or just data if no formula).

regards

FSt1

"David494" wrote:


Hey

I'm quite new to this VBAing in Access and I'm having a bit of a
problem here.

I have coding which allows an input box to appear when a button is
pressed......

Dim varInput As String

varInput = InputBox("Select your cell?")


First I would like the user to click on a cell to populate the formula
bar with the text they want to search for. Then they click on the
button and the input box pops up. However I want the input box to be
populated with the text from the formula bar.

Is this at all possible?

Cheers

Dave


--
David494
------------------------------------------------------------------------
David494's Profile: http://www.excelforum.com/member.php...o&userid=24482
View this thread: http://www.excelforum.com/showthread...hreadid=391278


  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi David,
The information in HELP is fairly decent as to the format.
Also see my page
InputBox, MsgBox and TextBox
http://www.mvps.org/dmcritchie/excel/inputbox.htm

for the third parameter use activecell.formula
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"David494" wrote in message
...

Hey

I'm quite new to this VBAing in Access and I'm having a bit of a
problem here.

I have coding which allows an input box to appear when a button is
pressed......

Dim varInput As String

varInput = InputBox("Select your cell?")


First I would like the user to click on a cell to populate the formula
bar with the text they want to search for. Then they click on the
button and the input box pops up. However I want the input box to be
populated with the text from the formula bar.

Is this at all possible?

Cheers

Dave


--
David494
------------------------------------------------------------------------
David494's Profile: http://www.excelforum.com/member.php...o&userid=24482
View this thread: http://www.excelforum.com/showthread...hreadid=391278



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
Creating a check mark box MarthaSue Setting up and Configuration of Excel 18 April 28th 05 12:31 AM
Named SUM Formula with relative refernce(s) Werner Rohrmoser Excel Worksheet Functions 2 April 20th 05 04:56 PM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
how do i make a cell date sensitive to execute a formula or input. ebuzz13 Excel Discussion (Misc queries) 2 January 20th 05 08:33 PM
Cell shows formula and not the result of the formula. stumpy1220 Excel Worksheet Functions 2 January 14th 05 05:11 PM


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