Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Michael
 
Posts: n/a
Default A small problem for you but big for me!

Dim Msg, Style, Title, Help, Ctxt, response, MyString 'Deklarerer msgbox

'If a user push a button this happens:

Msg = "Do you want to change the input ?"
Style = vbOKCancel + vbInformation + vbDefaultButton2
Title = "Input"

response = MsgBox(Msg, Style, Title)

If response = vbOK Then

MaterialRow = 0 'the column is called material
MaterialCol = 0
MaterialRow = ActiveSheet.Range("Material").Row
MaterialCol = ActiveSheet.Range("Material").Column '

response = InputBox("Please enter the row number", "Number Entry") 'The
user can choose row number

MaterialRow = response

Load FrmMaterial
FrmMaterial.TextBoxOldMaterial.Text = ActiveSheet.Range("f12").Value
'Instead of "f12" should i manage to put in MaterialRow, but i cant,
what's wrong?
FrmMaterial.Show

Else
End If

I want this to give me the contents of the cell MaterialRow no mather if its
a number or text.Help!!
--
Nil Satis Nisi Optimum
  #2   Report Post  
Kassie
 
Posts: n/a
Default

Hi Michael

In your inputbox you define the response as a number (row number). To use
this info, you will have to concatenate it with Col number, which is alpha.
MaterialCol & MaterialRow. However, you set MaterialCol to "0". Instead,
set it to "". I would also define it properly with Dim and As String

"Michael" wrote:

Dim Msg, Style, Title, Help, Ctxt, response, MyString 'Deklarerer msgbox

'If a user push a button this happens:

Msg = "Do you want to change the input ?"
Style = vbOKCancel + vbInformation + vbDefaultButton2
Title = "Input"

response = MsgBox(Msg, Style, Title)

If response = vbOK Then

MaterialRow = 0 'the column is called material
MaterialCol = 0
MaterialRow = ActiveSheet.Range("Material").Row
MaterialCol = ActiveSheet.Range("Material").Column '

response = InputBox("Please enter the row number", "Number Entry") 'The
user can choose row number

MaterialRow = response

Load FrmMaterial
FrmMaterial.TextBoxOldMaterial.Text = ActiveSheet.Range("f12").Value
'Instead of "f12" should i manage to put in MaterialRow, but i cant,
what's wrong?
FrmMaterial.Show

Else
End If

I want this to give me the contents of the cell MaterialRow no mather if its
a number or text.Help!!
--
Nil Satis Nisi Optimum

  #3   Report Post  
Michael
 
Posts: n/a
Default

Thanks Kassie!

"Kassie" wrote:

Hi Michael

In your inputbox you define the response as a number (row number). To use
this info, you will have to concatenate it with Col number, which is alpha.
MaterialCol & MaterialRow. However, you set MaterialCol to "0". Instead,
set it to "". I would also define it properly with Dim and As String

"Michael" wrote:

Dim Msg, Style, Title, Help, Ctxt, response, MyString 'Deklarerer msgbox

'If a user push a button this happens:

Msg = "Do you want to change the input ?"
Style = vbOKCancel + vbInformation + vbDefaultButton2
Title = "Input"

response = MsgBox(Msg, Style, Title)

If response = vbOK Then

MaterialRow = 0 'the column is called material
MaterialCol = 0
MaterialRow = ActiveSheet.Range("Material").Row
MaterialCol = ActiveSheet.Range("Material").Column '

response = InputBox("Please enter the row number", "Number Entry") 'The
user can choose row number

MaterialRow = response

Load FrmMaterial
FrmMaterial.TextBoxOldMaterial.Text = ActiveSheet.Range("f12").Value
'Instead of "f12" should i manage to put in MaterialRow, but i cant,
what's wrong?
FrmMaterial.Show

Else
End If

I want this to give me the contents of the cell MaterialRow no mather if its
a number or text.Help!!
--
Nil Satis Nisi Optimum

  #4   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Michael,

FrmMaterial.TextBoxOldMaterial.Text = _
ActiveSheet.Range("F" & MaterialRow ).Value

HTH,
Bernie
MS Excel MVP


"Michael" wrote in message
...
Dim Msg, Style, Title, Help, Ctxt, response, MyString 'Deklarerer msgbox

'If a user push a button this happens:

Msg = "Do you want to change the input ?"
Style = vbOKCancel + vbInformation + vbDefaultButton2
Title = "Input"

response = MsgBox(Msg, Style, Title)

If response = vbOK Then

MaterialRow = 0 'the column is called material
MaterialCol = 0
MaterialRow = ActiveSheet.Range("Material").Row
MaterialCol = ActiveSheet.Range("Material").Column '

response = InputBox("Please enter the row number", "Number Entry")

'The
user can choose row number

MaterialRow = response

Load FrmMaterial
FrmMaterial.TextBoxOldMaterial.Text = ActiveSheet.Range("f12").Value
'Instead of "f12" should i manage to put in MaterialRow, but i cant,
what's wrong?
FrmMaterial.Show

Else
End If

I want this to give me the contents of the cell MaterialRow no mather if

its
a number or text.Help!!
--
Nil Satis Nisi Optimum



  #5   Report Post  
Michael
 
Posts: n/a
Default

Thanks Bernie, that was a easy one, it works perfect :-)
--
Nil Satis Nisi Optimum


"Bernie Deitrick" wrote:

Michael,

FrmMaterial.TextBoxOldMaterial.Text = _
ActiveSheet.Range("F" & MaterialRow ).Value

HTH,
Bernie
MS Excel MVP


"Michael" wrote in message
...
Dim Msg, Style, Title, Help, Ctxt, response, MyString 'Deklarerer msgbox

'If a user push a button this happens:

Msg = "Do you want to change the input ?"
Style = vbOKCancel + vbInformation + vbDefaultButton2
Title = "Input"

response = MsgBox(Msg, Style, Title)

If response = vbOK Then

MaterialRow = 0 'the column is called material
MaterialCol = 0
MaterialRow = ActiveSheet.Range("Material").Row
MaterialCol = ActiveSheet.Range("Material").Column '

response = InputBox("Please enter the row number", "Number Entry")

'The
user can choose row number

MaterialRow = response

Load FrmMaterial
FrmMaterial.TextBoxOldMaterial.Text = ActiveSheet.Range("f12").Value
'Instead of "f12" should i manage to put in MaterialRow, but i cant,
what's wrong?
FrmMaterial.Show

Else
End If

I want this to give me the contents of the cell MaterialRow no mather if

its
a number or text.Help!!
--
Nil Satis Nisi Optimum




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
Problem with small()....I think Weekend user Excel Worksheet Functions 5 May 16th 05 11:21 AM
Excel Display Problem Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 0 April 19th 05 05:25 PM
data structure and my problem samantha Excel Worksheet Functions 2 April 11th 05 02:38 PM
Problem opening Excel 2003 in a Small Business edition installing:function of Excel Excel Discussion (Misc queries) 1 April 11th 05 09:09 AM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM


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