Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Flexibility assign Cell value

I am using Class member to store the data config. My Problem is that
when worksheet add/change/delete row. I need to reconfig it again. It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Flexibility assign Cell value

You can trap those action by modifying:
http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is that
when worksheet add/change/delete row. I need to reconfig it again. It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Flexibility assign Cell value

Hi NickHK
It is not my case.

My problem is that if new row added in B6
Below code need to change
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value


New Coding should be update as below.

DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B7").Value
DNS.DNNAddr = loSheet.Range("B8").Value


How to hande this case ?


NickHK wrote:
You can trap those action by modifying:
http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is that
when worksheet add/change/delete row. I need to reconfig it again. It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Flexibility assign Cell value

Don't understand what you want then.
How do you know when a row is inserted/deleted then ?
You need some way to know that row 6 has been added, then adjust your value
to be +1 row.

NickHK

"moonhk" wrote in message
oups.com...
Hi NickHK
It is not my case.

My problem is that if new row added in B6
Below code need to change
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value


New Coding should be update as below.

DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B7").Value
DNS.DNNAddr = loSheet.Range("B8").Value


How to hande this case ?


NickHK wrote:
You can trap those action by modifying:

http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is that
when worksheet add/change/delete row. I need to reconfig it again. It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Flexibility assign Cell value

Hi NickNK
When user add/delete row, Then the program will not work .
or When I add/delete row, Need to update the program again.

NickHK wrote:
Don't understand what you want then.
How do you know when a row is inserted/deleted then ?
You need some way to know that row 6 has been added, then adjust your value
to be +1 row.

NickHK

"moonhk" wrote in message
oups.com...
Hi NickHK
It is not my case.

My problem is that if new row added in B6
Below code need to change
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value


New Coding should be update as below.

DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B7").Value
DNS.DNNAddr = loSheet.Range("B8").Value


How to hande this case ?


NickHK wrote:
You can trap those action by modifying:

http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is that
when worksheet add/change/delete row. I need to reconfig it again. It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Flexibility assign Cell value

Why not use named ranges, then it does not matter, assuming you do not allow
the user to delete them.
DNS.SummarySh = loSheet.Range("SummarySh").Value

NickHK

"moonhk" wrote in message
ups.com...
Hi NickNK
When user add/delete row, Then the program will not work .
or When I add/delete row, Need to update the program again.

NickHK wrote:
Don't understand what you want then.
How do you know when a row is inserted/deleted then ?
You need some way to know that row 6 has been added, then adjust your

value
to be +1 row.

NickHK

"moonhk" wrote in message
oups.com...
Hi NickHK
It is not my case.

My problem is that if new row added in B6
Below code need to change
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value

New Coding should be update as below.

DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B7").Value
DNS.DNNAddr = loSheet.Range("B8").Value

How to hande this case ?


NickHK wrote:
You can trap those action by modifying:


http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is

that
when worksheet add/change/delete row. I need to reconfig it again.

It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Flexibility assign Cell value

I try before. But I have more than 300+ items need to named it. So, I
give up.

NickHK wrote:
Why not use named ranges, then it does not matter, assuming you do not allow
the user to delete them.
DNS.SummarySh = loSheet.Range("SummarySh").Value

NickHK

"moonhk" wrote in message
ups.com...
Hi NickNK
When user add/delete row, Then the program will not work .
or When I add/delete row, Need to update the program again.

NickHK wrote:
Don't understand what you want then.
How do you know when a row is inserted/deleted then ?
You need some way to know that row 6 has been added, then adjust your

value
to be +1 row.

NickHK

"moonhk" wrote in message
oups.com...
Hi NickHK
It is not my case.

My problem is that if new row added in B6
Below code need to change
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value

New Coding should be update as below.

DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B7").Value
DNS.DNNAddr = loSheet.Range("B8").Value

How to hande this case ?


NickHK wrote:
You can trap those action by modifying:


http://www.dailydoseofexcel.com/arch...-deleted-rows/

NickHK

"moonhk" wrote in message
ups.com...
I am using Class member to store the data config. My Problem is

that
when worksheet add/change/delete row. I need to reconfig it again.

It
any flexibility way to do this ?

Option Explicit
Public Main As New clsMain
Public errStr As String
Public errFlag As Boolean
Public Raw As New clsConfigSinraw
Public Target As New clsConfigSinTarget
Public DNS As New clsDNSummary

Public Sub getConfig()
Dim loSheet As Worksheet
On Error Resume Next
errFlag = False
Set loSheet =
Application.Workbooks(Main.getVFile).Sheets(Main.g etVmainNameGEN)
If loSheet Is Nothing Then
errFlag = True
errStr = errStr + ""
Exit Sub
End If
'~~return to normal error handling
On Error GoTo 0
DNS.SummarySh = loSheet.Range("B5").Value
DNS.AmountAddr = loSheet.Range("B6").Value
DNS.DNNAddr = loSheet.Range("B7").Value
DNS.MfgproAccAddr = loSheet.Range("B8").Value
DNS.MfgproCCAddr = loSheet.Range("B9").Value
DNS.CurrAmtAddr = loSheet.Range("B10").Value
DNS.SubTotalAddr = loSheet.Range("B11").Value
DNS.MarkupAddr = loSheet.Range("B12").Value
DNS.BT_RCTAddr = loSheet.Range("B13").Value
DNS.VAT_CSAddr = loSheet.Range("B14").Value
DNS.TotalAmtAddr = loSheet.Range("B15").Value
DNS.LinePropAddr = loSheet.Range("B16").Value
DNS.SupplierAddr = loSheet.Range("B17").Value
DNS.CurrencyAddr = loSheet.Range("B18").Value
DNS.EffectdateAddr = loSheet.Range("B19").Value
DNS.DateAddr = loSheet.Range("B20").Value
DNS.ProjectCodeAddr = loSheet.Range("B21").Value
DNS.DescriptionAddr = loSheet.Range("B22").Value


DNS.AmountHAddr = loSheet.Range("A6").Value
DNS.DNNHAddr = loSheet.Range("A7").Value
DNS.MfgproAccHAddr = loSheet.Range("A8").Value
DNS.MfgproCCHAddr = loSheet.Range("A9").Value
DNS.CurrAmtHAddr = loSheet.Range("A10").Value
DNS.SubTotalHAddr = loSheet.Range("A11").Value
DNS.MarkupHAddr = loSheet.Range("A12").Value
DNS.BT_RCTHAddr = loSheet.Range("A13").Value
DNS.VAT_CSHAddr = loSheet.Range("A14").Value
DNS.TotalAmtHAddr = loSheet.Range("A15").Value
DNS.LinePropHAddr = loSheet.Range("A16").Value
DNS.SupplierHAddr = loSheet.Range("A17").Value
DNS.CurrencyHAddr = loSheet.Range("A18").Value
DNS.EffectdateHAddr = loSheet.Range("A19").Value
DNS.DateHAddr = loSheet.Range("A20").Value
DNS.ProjectCodeHAddr = loSheet.Range("A21").Value
DNS.DescriptionHAddr = loSheet.Range("A22").Value
End Sub




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
date flexibility Karina[_2_] Excel Worksheet Functions 1 July 15th 08 10:44 PM
Can you build a formula in one cell with flexibility Jason52 Excel Discussion (Misc queries) 2 April 13th 07 05:22 PM
Excel Indent function flexibility Joon Kim Excel Programming 1 May 3rd 06 10:56 PM
Add flexibility to Criteria of DFunctions DavidWizard Excel Worksheet Functions 0 May 2nd 06 11:53 PM
Adjusting VBA code for some flexibility adidas VBA Excel Programming 7 November 30th 03 03:39 PM


All times are GMT +1. The time now is 06:56 AM.

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"