Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Popup in excel macro

Hi All,

I have macro which I'm applying on files but every time I have to make two
changes in macro, is it possible that the popup appear and ask for that two
values and store in b2 and c2?

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Popup in excel macro

The following is an example of getting user input. Lookup Inputbox in help
for more info on the the subject.

Sub InputData()

Dim data4B2 As Variant
Dim data4C2 As Variant

data4B2 = InputBox("Enter data for cell B2")
Sheets("Sheet1").Range("B2") = data4B2

data4C2 = InputBox("Enter data for cell C2")
Sheets("Sheet1").Range("C2") = data4C2

End Sub

--
Regards,

OssieMac


"Hassan" wrote:

Hi All,

I have macro which I'm applying on files but every time I have to make two
changes in macro, is it possible that the popup appear and ask for that two
values and store in b2 and c2?

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Popup in excel macro

Thanks for reply.
There is one more query that when I am apply following then I have to change
sheet name to Sheet1, is it possible to run on opened sheet, If yes then
where I have to make changes?

Thanks

Hassan

"OssieMac" wrote:

The following is an example of getting user input. Lookup Inputbox in help
for more info on the the subject.

Sub InputData()

Dim data4B2 As Variant
Dim data4C2 As Variant

data4B2 = InputBox("Enter data for cell B2")
Sheets("Sheet1").Range("B2") = data4B2

data4C2 = InputBox("Enter data for cell C2")
Sheets("Sheet1").Range("C2") = data4C2

End Sub

--
Regards,

OssieMac


"Hassan" wrote:

Hi All,

I have macro which I'm applying on files but every time I have to make two
changes in macro, is it possible that the popup appear and ask for that two
values and store in b2 and c2?

Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Popup in excel macro

Change Sheets("Sheet1").Range("B2") = data4B2

To ActiveSheet.Range("B2") = data4B2

In both instances


Gord Dibben MS Excel MVP

On Thu, 24 Jul 2008 06:18:01 -0700, Hassan
wrote:

Thanks for reply.
There is one more query that when I am apply following then I have to change
sheet name to Sheet1, is it possible to run on opened sheet, If yes then
where I have to make changes?

Thanks

Hassan

"OssieMac" wrote:

The following is an example of getting user input. Lookup Inputbox in help
for more info on the the subject.

Sub InputData()

Dim data4B2 As Variant
Dim data4C2 As Variant

data4B2 = InputBox("Enter data for cell B2")
Sheets("Sheet1").Range("B2") = data4B2

data4C2 = InputBox("Enter data for cell C2")
Sheets("Sheet1").Range("C2") = data4C2

End Sub

--
Regards,

OssieMac


"Hassan" wrote:

Hi All,

I have macro which I'm applying on files but every time I have to make two
changes in macro, is it possible that the popup appear and ask for that two
values and store in b2 and c2?

Thanks in advance


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
Popup macro puiuluipui Excel Discussion (Misc queries) 12 October 6th 09 07:38 PM
Macro Properties Password Popup. SunRace Excel Programming 1 January 29th 08 10:16 AM
Add a warning popup to a Macro Button Teresa Excel Worksheet Functions 4 January 16th 06 09:27 PM
How do i create a popup window (a macro ?) Susanne Excel Programming 3 April 15th 05 02:16 PM
Enable & Disable Macro popup disappear Wayne Excel Programming 5 November 11th 04 06:20 PM


All times are GMT +1. The time now is 11:45 PM.

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

About Us

"It's about Microsoft Excel"