ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Offset (https://www.excelbanter.com/excel-programming/338205-offset.html)

Syed Haider Ali[_12_]

Offset
 

Hi Dears,

Anybody can help me that how to use offset command on UserForm.


Thanks

Syed Haider Ali


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=398684


Chip Pearson

Offset
 
You need to provide much more detail about what you are trying to
do.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Syed Haider Ali"
<Syed.Haider.Ali.1ua5yg_1124906729.0942@excelfor um-nospam.com
wrote in message
news:Syed.Haider.Ali.1ua5yg_1124906729.0942@excelf orum-nospam.com...

Hi Dears,

Anybody can help me that how to use offset command on UserForm.


Thanks

Syed Haider Ali


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile:
http://www.excelforum.com/member.php...o&userid=21994
View this thread:
http://www.excelforum.com/showthread...hreadid=398684




roblo[_5_]

Offset
 

Since this subject is posted, I have an additional question.

How do you use an offset in a Range .Select

worksheet.Range("A1:C1") .Select

the Cell C1 is a calculated field based on number of columns being
added. I tried to use the following format that worked for mapping an
element, but can't make it work in the Range statement above. Also,
can the offset be zerio.

actColumn = actColumn + 1
set xp = worksheet.Range("A1:A2").Offset(1,actColumn).Xpath
xp.SetValue workbook.XmlMaps(1), strXPath

Thanks
Robert


--
roblo
------------------------------------------------------------------------
roblo's Profile: http://www.excelforum.com/member.php...o&userid=22469
View this thread: http://www.excelforum.com/showthread...hreadid=398684


Syed Haider Ali[_13_]

Offset
 

Dear Chip Pearson and Roblo,

Actually i have a Table just like below

A B C

1 10000 Capital Account 1,000,000,000
2 20000 Long Term Liability 650,000,000
3 30000 Short Term Finances 115,000,000
4 40000 Assets 2,500,000,000
5 50000 Stocks 897,000

Also i have a user form where i put col "B" in a comboBox, and when
select the comboBox the corresponding value from Col "C" shows i
Textbox. For this i am using following codes

Private Sub UserForm_activate()
Sheet1.Activate
ComboBox1.ColumnCount = 1
ComboBox1.RowSource = "b1:b5"
End Sub

Private sub ComboBox1_aferupdate()

textbox1 = Application.WorksheetFunction.VLookup(ComboBox1
Sheet1.Range_("b2:c5"), 2, False)

End Sub

I need codes that when I select somthing from Col "B" through ComboBox
then the corresponding value from Col "A" will be shown in Textbo
(instead of from Col "C")

Thanks

Syed Haider Al

--
Syed Haider Al
-----------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...fo&userid=2199
View this thread: http://www.excelforum.com/showthread.php?threadid=39868


Syed Haider Ali[_14_]

Offset
 

Hi Dears,

Can anybody help me regarding abov

--
Syed Haider Al
-----------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...fo&userid=2199
View this thread: http://www.excelforum.com/showthread.php?threadid=39868


Syed Haider Ali[_15_]

Offset
 

Hi

Is there any solution?


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=398684


Dave Peterson

Offset
 
I'm not sure I understand, but maybe...

Option Explicit
Private Sub ComboBox1_Change()
If Me.ComboBox1.ListIndex -1 Then
Me.TextBox1.Text = Sheet1.Range("a1:A5")(Me.ComboBox1.ListIndex + 1)
End If
End Sub
Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Sheet1.Range("b1:b5").Address(external:=True)
End Sub





Syed Haider Ali wrote:

Dear Chip Pearson and Roblo,

Actually i have a Table just like below

A B C

1 10000 Capital Account 1,000,000,000
2 20000 Long Term Liability 650,000,000
3 30000 Short Term Finances 115,000,000
4 40000 Assets 2,500,000,000
5 50000 Stocks 897,000

Also i have a user form where i put col "B" in a comboBox, and when i
select the comboBox the corresponding value from Col "C" shows in
Textbox. For this i am using following codes

Private Sub UserForm_activate()
Sheet1.Activate
ComboBox1.ColumnCount = 1
ComboBox1.RowSource = "b1:b5"
End Sub

Private sub ComboBox1_aferupdate()

textbox1 = Application.WorksheetFunction.VLookup(ComboBox1,
Sheet1.Range_("b2:c5"), 2, False)

End Sub

I need codes that when I select somthing from Col "B" through ComboBox,
then the corresponding value from Col "A" will be shown in Textbox
(instead of from Col "C")

Thanks

Syed Haider Ali

--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=398684


--

Dave Peterson

Syed Haider Ali[_16_]

Offset
 

Hi Dave Peterson,

It is doing properly, It solve my Problem

Thanks a lot off.

Syed Haider Ali


--
Syed Haider Ali
------------------------------------------------------------------------
Syed Haider Ali's Profile: http://www.excelforum.com/member.php...o&userid=21994
View this thread: http://www.excelforum.com/showthread...hreadid=398684



All times are GMT +1. The time now is 12:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com