#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

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
Offset??? Ken Excel Discussion (Misc queries) 2 March 23rd 09 03:28 PM
Help with Offset kazoo Excel Discussion (Misc queries) 4 August 26th 08 10:24 PM
Compare Cell Values, Offset(-1,0), Offset(-1,-1), and xlFillDefaul RyGuy Excel Worksheet Functions 2 September 28th 07 10:54 PM
Offset Esrei Excel Discussion (Misc queries) 1 February 16th 07 11:42 AM
Problem with Range.Cells.Offset and Range.Cells( row + offset, column) [email protected] Excel Programming 2 August 22nd 05 05:25 AM


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